Engineering Tools for AI

程式設計

開發伺服器與部署術語

了解本機開發伺服器、網路 URL、port、build、部署、警告與常見 Web 錯誤。

42 個項目

本機開發

localhost

localhost

http://localhost:3001

意思

A hostname that points back to the same computer that is running the browser or command.

用途

Use localhost when checking the site on the same Mac or PC where the dev server is running.

注意

A phone or tablet has its own localhost, so it cannot use your Mac's localhost address.

範例

http://localhost:3001

請求範例

Open the local site at localhost and check the new reference page.

本機開發

127.0.0.1

127.0.0.1

http://127.0.0.1:3001

意思

A loopback IP address that also points to the same local computer.

用途

It is often interchangeable with localhost for same-device testing.

範例

http://127.0.0.1:3001

請求範例

Try 127.0.0.1 if localhost does not resolve correctly.

本機開發

Dev server

Dev server

npm run dev

意思

A server used while developing, with fast rebuilds and development-only features.

用途

Use it to preview changes before building or deploying the site.

注意

Dev server behavior is not always identical to deployed production behavior.

範例

npm run dev

請求範例

Start the dev server so I can check the page on my iPhone.

本機開發

Port

Port

http://localhost:3001

意思

A number that identifies which server process should receive the connection on a machine.

用途

If one server uses port 3001, another server must use a different port such as 3002.

範例

http://localhost:3001

請求範例

If port 3001 is already in use, start the dev server on another port.

本機開發

Local URL

Local URL

Local: http://localhost:3001

意思

The address used from the same device where the dev server is running.

用途

Use Local URL for desktop browser checks on the development machine.

範例

Local: http://localhost:3001

請求範例

Tell me the Local URL after starting the dev server.

網路存取

Network URL

Network URL

Network: http://172.30.1.55:3001

意思

An address other devices on the same network can use to reach the dev server.

用途

Use it when checking the site from an iPhone, iPad, or another computer on the same Wi-Fi.

注意

The dev server must listen on a network-accessible host such as 0.0.0.0.

範例

Network: http://172.30.1.55:3001

請求範例

Start the dev server with a Network URL so I can test it on my iPad.

網路存取

IP address

IP address

172.30.1.55

意思

A numeric address that identifies a device on a network.

用途

A LAN IP lets another device on the same Wi-Fi reach your dev server.

注意

Local network IPs can change when Wi-Fi or router conditions change.

範例

172.30.1.55

請求範例

Use the current LAN IP when adding allowedDevOrigins for device testing.

網路存取

Host

Host

--hostname 0.0.0.0

意思

The address a server binds to when it starts listening for requests.

用途

Binding to 0.0.0.0 allows the dev server to be reachable from other devices on the network.

範例

--hostname 0.0.0.0

請求範例

Run the dev server with hostname 0.0.0.0 for phone testing.

網路存取

Same network

Same network

Mac and iPhone on the same Wi-Fi

意思

Devices connected to the same local network, usually the same Wi-Fi router.

用途

A phone can reach your Mac's dev server only when network settings allow it.

範例

Mac and iPhone on the same Wi-Fi

請求範例

Check that the iPhone and Mac are on the same network before debugging the site.

Next.js 行為

allowedDevOrigins

allowedDevOrigins

allowedDevOrigins: ['172.30.1.55']

意思

A Next.js development setting that allows specific origins to access development resources.

用途

It can be needed when testing a Next dev server from a phone or tablet using a LAN IP.

注意

This is a development setting. Deployed static sites do not use the same dev-resource access path.

範例

allowedDevOrigins: ['172.30.1.55']

請求範例

Add my current LAN IP to allowedDevOrigins for development testing.

網路存取

Cross-origin

Cross-origin

Blocked cross-origin request

意思

A request between different origins, where scheme, host, or port differs.

用途

Development tools may block cross-origin access to sensitive dev resources by default.

範例

Blocked cross-origin request

請求範例

Explain whether this cross-origin warning affects production deployment.

Next.js 行為

HMR

HMR

/_next/webpack-hmr

意思

Hot Module Replacement updates the browser during development without a full reload.

用途

If HMR dev resources are blocked, the page may load but interactive updates or scripts can behave strangely in development.

注意

HMR is development-only and is not part of the final static export.

範例

/_next/webpack-hmr

請求範例

Check whether the iPhone issue is caused by blocked HMR dev resources.

Next.js 行為

Turbopack

Turbopack

Next.js 16.2.5 (Turbopack)

意思

A bundler used by Next.js for development and build workflows.

用途

You may see its name in dev server or build output.

範例

Next.js 16.2.5 (Turbopack)

請求範例

Summarize the Turbopack output and tell me whether the build succeeded.

Next.js 行為

App Router

App Router

src/app/[locale]/reference/page.tsx

意思

The Next.js routing system based on the app directory.

用途

Adding a page.tsx file under a folder creates a route.

範例

src/app/[locale]/reference/page.tsx

請求範例

Add the new reference page using the App Router folder structure.

Next.js 行為

generateStaticParams

generateStaticParams

generateStaticParams()

意思

A Next.js function that declares which dynamic routes should be generated at build time.

用途

Locale pages use it to create /en, /ko, /ja, and other language paths.

範例

generateStaticParams()

請求範例

Make sure the new reference page has generateStaticParams for all locales.

建置與輸出

Build

Build

npm run build

意思

The process that compiles and prepares the site for production or static output.

用途

Run build before deployment to catch TypeScript, route, and static generation problems.

範例

npm run build

請求範例

Run the build and confirm the new route is generated.

建置與輸出

Lint

Lint

npm run lint

意思

A static code check that catches style, correctness, and framework-rule issues.

用途

Lint is a quick check before build or commit.

範例

npm run lint

請求範例

Run lint after editing the reference pages.

建置與輸出

Static export

Static export

output: "export"

意思

A build output where pages are generated as static files instead of needing a running server.

用途

Static export is useful for hosting sites as prebuilt HTML, CSS, and JavaScript files.

注意

Some server-only features do not work with static export.

範例

output: "export"

請求範例

Keep the new page compatible with static export.

建置與輸出

SSG

SSG

● (SSG) prerendered as static HTML

意思

Static Site Generation creates pages at build time.

用途

Reference pages with generateStaticParams are generated for each locale during build.

範例

● (SSG) prerendered as static HTML

請求範例

Confirm that the reference route appears as SSG in the build output.

建置與輸出

Prerender

Prerender

prerendered as static content

意思

Rendering a page before a user requests it, usually during build.

用途

Prerendered pages load fast because HTML already exists.

範例

prerendered as static content

請求範例

Check that all locale pages are prerendered successfully.

建置與輸出

Bundle

Bundle

static JS bundle

意思

Compiled files that combine code and dependencies for the browser.

用途

Large bundles can affect load speed and should be watched as the site grows.

範例

static JS bundle

請求範例

Avoid adding a heavy library just for a simple reference page.

部署

Deploy

Deploy

deploy static output

意思

Publishing the built site so users can access it on the web.

用途

Deployment happens after local checks, lint, and build pass.

範例

deploy static output

請求範例

Do not deploy yet; just prepare the page and run build.

部署

Production

Production

production deployment

意思

The real deployed environment that users access.

用途

Production should be tested differently from the local dev server because dev-only features are absent.

範例

production deployment

請求範例

Explain whether this warning affects production or only development.

部署

Hosting

Hosting

static hosting provider

意思

The service or server that stores and serves the deployed site files.

用途

Static export can be served by static hosting when server logic is not required.

範例

static hosting provider

請求範例

Make sure the output works on static hosting.

部署

Domain

Domain

example.com

意思

The human-readable address users type to reach a site.

用途

A domain points to the deployed hosting location through DNS.

範例

example.com

請求範例

Do not hard-code localhost in links that should work on the production domain.

部署

DNS

DNS

A record / CNAME record

意思

The system that maps a domain name to the server or hosting target.

用途

DNS must be configured correctly for a custom domain to reach the deployed site.

範例

A record / CNAME record

請求範例

Explain whether the issue is a DNS problem or an app build problem.

部署

Cache

Cache

clear browser cache

意思

Stored copies of files or responses used to load pages faster.

用途

After deployment, old cached files can make a browser show a previous version for a while.

範例

clear browser cache

請求範例

Check whether the old page is still showing because of cache.

執行環境

Node.js

Node.js

node --version

意思

A JavaScript runtime used to run development tools, build scripts, and servers.

用途

Next.js dev and build commands run on Node.js.

範例

node --version

請求範例

Tell me whether this warning comes from Node.js, Next.js, or my app code.

執行環境

npm

npm

npm run build

意思

A package manager and script runner commonly used in JavaScript projects.

用途

package.json defines scripts such as dev, lint, and build that npm can run.

範例

npm run build

請求範例

Run the npm build script and summarize the result.

執行環境

package.json

package.json

"scripts": { "dev": "next dev -p 3001" }

意思

A project file that defines scripts, dependencies, and package metadata.

用途

Check package.json to know which commands the project expects you to run.

範例

"scripts": { "dev": "next dev -p 3001" }

請求範例

Check package.json before deciding which dev command to run.

執行環境

Environment variable

Environment variable

NEXT_PUBLIC_SITE_URL=https://example.com

意思

A value supplied to the app or build environment outside the source code.

用途

Environment variables are used for site URLs, API keys, and deployment-specific settings.

注意

Secrets should not be exposed through public client-side variables.

範例

NEXT_PUBLIC_SITE_URL=https://example.com

請求範例

Do not hard-code the production site URL if an environment variable already exists.

錯誤與警告

404

404

404 Not Found

意思

An error meaning the requested page or file was not found.

用途

It can happen when a route was deleted, renamed, or not generated in static output.

範例

404 Not Found

請求範例

Check whether the old programming-basics URL now returns 404 after removal.

錯誤與警告

500

500

500 Internal Server Error

意思

An error meaning the server failed while handling the request.

用途

In development, the terminal or browser overlay usually shows the source error.

範例

500 Internal Server Error

請求範例

If a 500 appears, inspect the terminal error and identify the failing file.

錯誤與警告

Module not found

Module not found

Module not found: Can't resolve '@/lib/programming'

意思

An error meaning an import points to a file or package that cannot be found.

用途

It often happens after moving, deleting, or renaming files without updating imports.

範例

Module not found: Can't resolve '@/lib/programming'

請求範例

Find and update any imports that still point to the removed file.

錯誤與警告

Export not found

Export not found

Export programmingBasicsCopy doesn't exist

意思

An error meaning a file exists, but the requested named export is not provided by that file.

用途

It can happen when a data object is renamed but imports still use the old name.

範例

Export programmingBasicsCopy doesn't exist

請求範例

Replace the old export name with the new one everywhere.

錯誤與警告

EADDRINUSE

EADDRINUSE

listen EADDRINUSE: address already in use 0.0.0.0:3001

意思

An error meaning another process is already using the requested host and port.

用途

Use another port or stop the existing server if you intentionally want to replace it.

範例

listen EADDRINUSE: address already in use 0.0.0.0:3001

請求範例

If EADDRINUSE appears, tell me which port is busy and use a different one.

錯誤與警告

DeprecationWarning

DeprecationWarning

[DEP0205] DeprecationWarning: module.register() is deprecated

意思

A warning that an API still works now but may be removed or changed later.

用途

Warnings should be noticed, but they are not always build-blocking errors.

範例

[DEP0205] DeprecationWarning: module.register() is deprecated

請求範例

Tell me whether this DeprecationWarning is harmless or requires a code change.

錯誤與警告

Hydration

Hydration

Hydration failed because the server rendered HTML didn't match

意思

The process where client-side JavaScript connects to server-rendered HTML.

用途

Mismatch errors happen when server and client render different initial content.

範例

Hydration failed because the server rendered HTML didn't match

請求範例

If hydration fails, check which component renders differently on the client.

指令

npm run dev

npm run dev

npm run dev

意思

A project script that starts the local development server.

用途

Use it while editing pages and checking changes locally.

範例

npm run dev

請求範例

Run npm run dev and give me the Local and Network URLs.

指令

npm run build

npm run build

npm run build

意思

A project script that creates the production build or static export.

用途

Run it after changes to ensure the app can be generated successfully.

範例

npm run build

請求範例

Run npm run build and summarize any warnings or failures.

指令

npm run lint

npm run lint

npm run lint

意思

A project script that runs lint checks.

用途

Run it before build to catch many code issues quickly.

範例

npm run lint

請求範例

Run lint before building the site.

指令

curl

curl

curl -I http://localhost:3001/ko

意思

A command-line tool for making HTTP requests and checking responses.

用途

curl can quickly check whether a local or deployed page responds with 200, 404, or another status.

範例

curl -I http://localhost:3001/ko

請求範例

Use curl to check whether the new reference route returns 200.