Skip to content

npm Scripts that call other npm scripts use the wrong npm version #946

@TheJaredWilcurt

Description

@TheJaredWilcurt

package.json

{
  "name": "my-project",
  "script": {
    "start": "npm run version",
    "version": "npm -v"
  },
  "volta": {
    "node": "24.0.0",
    "npm": "11.8.0"
  }
}
Command Result Location
proto -V proto 0.55.2 ~/.proto/bin/proto
node -v v24.0.0 ~/.proto/tools/node/24.0.0/bin/node
npm -v v11.8.0 ~/.proto/tools/npm/11.8.0/bin/npm
npm start v11.3.0 ~/.proto/tools/node/24.0.0/node_modules/npm/bin/npm
npm run version v11.3.0 ~/.proto/tools/node/24.0.0/node_modules/npm/bin/npm

Operating system?

Any

Architecture?

Any

Relates to

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions