-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasepr: needs documentationpull request requires docs before mergingpull request requires docs before merging
Milestone
Description
Current Behavior:
The flag --scripts-prepend-node-path
, which is supposed to add the calling node
executable to the PATH
variable, doesn't seem to work. The directory isn't added.
Expected Behavior:
The directory of the calling node
executable should be added to PATH
.
Steps To Reproduce:
- Download NodeJS and npm via nvm (in my case
14.15.5
and7.6.0
respectively) - Create some skeleton with a
package.json
(in my casenpm init nx-workspace
) - Call
node
andnpm
in isolation to any shell environment:(note: in order to fixenv -i bash --noprofile --norc -c '/path/to/.nvm/versions/node/v14.15.5/bin/node /path/to/.nvm/versions/node/v14.15.5/lib/node_modules/npm/bin/npm-cli.js --scripts-prepend-node-path run nx'
sh: nx: command not found
I've prepended the node call withPATH=$PATH:/path/to/.nvm/versions/node/v14.15.5/lib/node_modules/nx/bin
)
Expected Behavior:
The help message of nx
Current Behavior:
env: node: No such file or directory
If you add a script with env
or echo $PATH
to the package.json
you can see that PATH
doesn't contain the directory to the calling node
executable, so I assume it's not a bug of nx
.
Environment:
- macOS 11.1
- NodeJS 14.15.5
- npm 7.6.0
Fryuni and mcpiroman
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasepr: needs documentationpull request requires docs before mergingpull request requires docs before merging