-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
When start a node project with command pnpm run preview, it will lead the following problems:
node:fs:1372
const result = binding.mkdir(
^
Error: EACCES: permission denied, mkdir '/nonexistent/.cache/node/corepack/v1'
at mkdirSync (node:fs:1372:26)
at getTemporaryFolder (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22638:27)
at download (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22914:21)
at installVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23009:61)
at async Engine.ensurePackageManager (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23449:32)
at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23545:25)
at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:24232:5) {
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/nonexistent/.cache/node/corepack/v1'
}
Node.js v20.13.1I think USER nonroot:nonroot lets it have no permission to create the related directories. But it works well if we change the start command to npm run preview.
So, I'm wondering if it is ok to always start the node project with command npm run preview. yarn, pnpm are only important when building the source code. Please let me know if you have any good ideas.
Metadata
Metadata
Assignees
Labels
No labels