Nuxt 3.13 clean yarn install fails.

docker run -it --entrypoint=/bin/bash node:22-bookworm
cd ~
corepack enable
yarn dlx nuxi@latest init cybercore-2024
docker run -it --entrypoint=/bin/bash node:22-bookworm
cd ~
corepack enable
yarn dlx nuxi@latest init cybercore-2024
Package manager selection
✔ Which package manager would you like to use?
yarn
yarn install v1.22.22
✔ Which package manager would you like to use?
yarn
yarn install v1.22.22
Fails with
4/4] Building fresh packages...


error Error: /root/cybercore-2024/node_modules/nitropack/node_modules/esbuild: Cannot find module 'pnpapi'
Require stack:
- /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js
- /root/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn.js
Require stack:
- /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js
- /root/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
at require$$0.Module._resolveFilename (/tmp/xfs-a5587751/dlx-18/.pnp.cjs:6538:54)
at require.resolve (/root/.cache/node/corepack/v1/yarn/1.22.22/lib/v8-compile-cache.js:162:23)
at /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js:34245:76
at Generator.next (<anonymous>)
at step (/root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js:310:30)



ERROR Error: Command failed with exit code 1: corepack yarn install
4/4] Building fresh packages...


error Error: /root/cybercore-2024/node_modules/nitropack/node_modules/esbuild: Cannot find module 'pnpapi'
Require stack:
- /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js
- /root/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn.js
Require stack:
- /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js
- /root/.cache/node/corepack/v1/yarn/1.22.22/bin/yarn.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
at require$$0.Module._resolveFilename (/tmp/xfs-a5587751/dlx-18/.pnp.cjs:6538:54)
at require.resolve (/root/.cache/node/corepack/v1/yarn/1.22.22/lib/v8-compile-cache.js:162:23)
at /root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js:34245:76
at Generator.next (<anonymous>)
at step (/root/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js:310:30)



ERROR Error: Command failed with exit code 1: corepack yarn install
Equivalent npm install is working. Instructions found here. https://nuxt.com/docs/getting-started/installation Is yarn use viable or risky? interestingly this works.
npx nuxi@latest init cybercore-2024

✔ Which package manager would you like to use?
yarn
npx nuxi@latest init cybercore-2024

✔ Which package manager would you like to use?
yarn
1 Reply
IceMeltAll
IceMeltAll3mo ago
this is old and noboyd answered, but I would never want to docker npm init anything. I'd rather once set up the nuxt application and then make most of its folder (excep node_modules and .nuxt) part of the docker container via 'volumes' parameter nevertheless, that's the least of the issues when trying to run a docker container for nuxt. I've seen so many pre-set examples for React or any other technologies, but none for nuxt
Want results from more Discord servers?
Add your server