Personal website built by Nuxt 3
English | ç®€ä½“ä¸æ–‡
- Node.js
18.20.x; the project.nvmrcpins18.20.3 - pnpm
9.x; this project pins9.12.3 - Use pnpm only. Do not mix npm, yarn, or bun, and do not generate
package-lock.jsonoryarn.lock
# Use the Node.js version specified by the project
nvm install
nvm use
# Enable Corepack and activate the pinned pnpm version
corepack enable
corepack prepare pnpm@9.12.3 --activate
# Install exactly what is recorded in pnpm-lock.yaml
pnpm install --frozen-lockfileIf nvm is unavailable, install Node.js 18.20.3 first and continue from corepack enable.
pnpm devOpen http://localhost:3000.
pnpm lintpnpm buildpnpm previewVerify the runtime versions and reinstall from the lockfile:
node --version
pnpm --version
pnpm install --frozen-lockfileDo not delete or bypass pnpm-lock.yaml. If the lockfile must be updated, run pnpm install with Node.js 18.20.3 and pnpm 9.12.3, then commit the lockfile changes together with package.json.
# Build an image
docker build -t my-nuxt-app .
# Run container
docker run -d -p 3000:3000 --name my-running-nuxt-app my-nuxt-app
# View the running container
docker ps
# View all containers
docker ps -aMIT © haohaitao

