-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] npm.load does not accept any options. Only callback #2137
Comments
Can't edit the title, too late. Hope you don't ignore this. |
Have you tried with npm v7.0.9? |
Yes, and it still doesn't work |
not sure this is related, I am getting the same error when I try to do anything with apm and atom in general that would involve calling npm at some point, and I have not seen issues with npm directly, this thread is the first result of my search to find answers what information would I need to provide ` will@willdesk /home/will/drive/sync/mine/important 20201114.222329 TypeError: must call as: npm.load(callback) will@willdesk /home/will/drive/sync/mine/important 20201114.222431
will@willdesk /home/will/drive/sync/mine/important 20201114.222639 `
will@willdesk /home/will/drive/sync/mine/important 20201114.222827 |
updated info again unsure it is related, I switched from the Arch community package, to the aur/atom-editor-bin package to fix some other issues with the atom editor, now everything works as intended in atom, as well as from the command line, my npm command line has not given me any grief ever, only the apm generated npm error referenced previously apm no longer generates the npm error on entering any parameters, and atom/apm seem to be using their internal npm, nodejs, etc. will@willdesk /wsource/python/masherII_DEV 20201122.194216 will@willdesk /wsource/python/masherII_DEV 20201122.194221 |
This is caused by an API change in NPM CLI. npm.load now only accepts a callback in the latest version. I'm not sure why this API change was made. This change wasn't present in npm version 6.14.11, it was introduced shortly after that version. |
the npm programmatic API hasn’t followed semver since like v3 or something; generally it’d best to shell out to the cli instead. |
Current Behavior:
npm.load does not accept any options. Only callback.
Expected Behavior:
npm.load actually recognizing my specified options and using them.
Steps To Reproduce:
steps to reproduce the behavior:
Environment:
What the .d.ts has to say about it:
Temporary Workaround
Note that with this workaround you can't install multiple modules in one line
The text was updated successfully, but these errors were encountered: