-
-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPM installation incorrect #1190
Comments
npm exec node -- -e '
const path=require("path");
console.log(
process.env.npm_config_prefix
? path.join(process.env.npm_config_prefix, "bin")
: path.join(process.env.npm_config_local_prefix, "node_modules", ".bin"),
);
' |
The |
Since Node.js 18.16.0, I can't seem to run $ npm install '@go-task/[email protected]'
npm ERR! code 1
npm ERR! path D:\a\test-if-we-can-run-go-task-on-windows-on-github-workflow\test-if-we-can-run-go-task-on-windows-on-github-workflow\node_modules\@go-task\cli
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c go-npm install
npm ERR! Downloading from URL: https://github.com/go-task/task/releases/download/v3.25.0/task_windows_amd64.zip
npm ERR! D:\a\test-if-we-can-run-go-task-on-windows-on-github-workflow\test-if-we-can-run-go-task-on-windows-on-github-workflow\node_modules\@go-task\go-npm\bin\index.js:2
...
npm ERR!
npm ERR!
npm ERR! Error: Illegal characters in path.
npm ERR! at pathArg (D:\a\test-if-we-can-run-go-task-on-windows-on-github-workflow\test-if-we-can-run-go-task-on-windows-on-github-workflow\node_modules\@go-task\go-npm\bin\index.js:2:1989)
npm ERR! at Function.mkdirpSync [as sync] (D:\a\test-if-we-can-run-go-task-on-windows-on-github-workflow\test-if-we-can-run-go-task-on-windows-on-github-workflow\node_modules\@go-task\go-npm\bin\index.js:2:5717)
npm ERR! at D:\a\test-if-we-can-run-go-task-on-windows-on-github-workflow\test-if-we-can-run-go-task-on-windows-on-github-workflow\node_modules\@go-task\go-npm\bin\index.js:2:910301
npm ERR! at ChildProcess.exithandler (node:child_process:411:7)
npm ERR! at ChildProcess.emit (node:events:511:28)
npm ERR! at maybeClose (node:internal/child_process:1098:[16](https://github.com/sounisi5011/test-if-we-can-run-go-task-on-windows-on-github-workflow/actions/runs/5112278768/jobs/9190139130#step:3:17))
npm ERR! at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
npm ERR! path: 'D:\\a\\test-if-we-can-run-go-task-on-windows-on-github-workflow\\test-if-we-can-run-go-task-on-windows-on-github-workflow\\node_modules\\@go-task\\cli\\Unknown command: "bin"\n' +
npm ERR! '\n' +
npm ERR! 'To see a list of supported npm commands, run:\n' +
npm ERR! ' npm help',
npm ERR! code: 'EINVAL'
npm ERR! }
npm ERR!
npm ERR! Node.js v[20](https://github.com/sounisi5011/test-if-we-can-run-go-task-on-windows-on-github-workflow/actions/runs/5112278768/jobs/9190139130#step:3:21).0.0 This error does not seem to occur on Unix-like systems 1, but the same thing can happen. Once I find the cause, I will open an issue in go-task/go-npm. Footnotes
|
This problem is caused by a bug in npm. This bug has been fixed in npm 9.6.7, and you can avoid this problem by running the following command in your environment. npm install -g [email protected] On the other hand, this bug occurs in all versions from npm 7.19.0 to npm 9.6.6. If you cannot upgrade npm in your environment, please wait a little longer. |
This bug is now fixed, but you'll have to wait for the next major version for it to work. |
Repro steps:
Install task with NPM:
Run task:
Investigate the installation folder:
Where is the
task
binary?The text was updated successfully, but these errors were encountered: