Skip to content
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

version 7.8.0 fail to install on node 6.1.0 #11000

Closed
eilon-shai opened this issue Jan 13, 2020 · 6 comments · Fixed by #11003
Closed

version 7.8.0 fail to install on node 6.1.0 #11000

eilon-shai opened this issue Jan 13, 2020 · 6 comments · Fixed by #11003
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@eilon-shai
Copy link

our build is failing since 12/1 on npm install, we are using jest@23.6.0 and it is using @babel/highlight@7.8.0
it fails both on jenkins (linux) and locally (macos).
we are using node 6.1.0 npm 3.8.6
error:
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/local/lib/node_modules/npm/lib/install/deps.js:455:12)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/lib/install/deps.js:190:5
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
npm ERR! typeerror at Array.forEach (native)
npm ERR! typeerror at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
npm ERR! typeerror at exports.loadRequestedDeps (/usr/local/lib/node_modules/npm/lib/install/deps.js:188:3)

expected behaviour
npm install should pass successfully as before

@babel-bot
Copy link
Collaborator

Hey @eilon-shai! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Jan 13, 2020

Using node 6.1.0 and npm 3.8.6 I get a slightly different error:

➜ npm i -D jest@23.6.0
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Linux 5.3.0-26-generic
npm ERR! argv "/home/nicolo/n/bin/node" "/home/nicolo/n/bin/npm" "i" "-D" "jest@23.6.0"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/home/nicolo/n/lib/node_modules/npm/lib/install/deps.js:455:12)
npm ERR! typeerror     at /home/nicolo/n/lib/node_modules/npm/lib/install/deps.js:456:7
npm ERR! typeerror     at /home/nicolo/n/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/home/nicolo/n/lib/node_modules/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /home/nicolo/n/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/nicolo/Documenti/dev/babel-bugs/issue-11000/npm-debug.log

(Nore the This is an error with npm itself message)

EDIT: @babel/highlight@7.5.0 doesn't cause the error, so this could be caused by us.

@nicolo-ribaudo
Copy link
Member

Ok, this is the problem:
When npm@3 downloads a package.json file from the registry, in some cases (I didn't understand exactly when) it adds a type: property to mark it as having a different format.

We added type: "commonjs" to our package, thus downloadedPackage.type is always truthy and thus "normal" package.json files aren't handled correctly.

https://github.com/npm/npm/blob/db9cde008ce855bdac801bb6649cbfb5bb7911ac/lib/install/deps.js#L452-L458

@eilon-shai
Copy link
Author

Thank you for the quick response

@nicolo-ribaudo
Copy link
Member

I'll release it after that #11002 (a fix for a different regression) is merged.

@eilon-shai
Copy link
Author

great, thanks

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants