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

Node 15 breaks stuff when running npm i #975

Closed
kethinov opened this issue Oct 29, 2020 · 2 comments · Fixed by #986
Closed

Node 15 breaks stuff when running npm i #975

kethinov opened this issue Oct 29, 2020 · 2 comments · Fixed by #986
Labels
bug P1 Highest Priority

Comments

@kethinov
Copy link
Member

npm i
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

> roosevelt@0.19.3 postinstall
> node ./lib/scripts/configAuditor.js && node ./lib/scripts/deprecationCheck.js

node:internal/validators:123
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:258:15)
    at validateString (node:internal/validators:123:11)
    at Object.join (node:path:1039:7)
    at configAudit (roosevelt/lib/scripts/configAuditor.js:28:35)
    at Object.<anonymous> (roosevelt/lib/scripts/configAuditor.js:10:3)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code 1
npm ERR! path roosevelt
npm ERR! command failed
npm ERR! command sh -c node ./lib/scripts/configAuditor.js && node ./lib/scripts/deprecationCheck.js
@kethinov kethinov added bug P1 Highest Priority labels Oct 29, 2020
@Autre31415
Copy link
Member

I suspect that crash is caused by this line, specifically the process.env.INIT_CWD portion of it. Perhaps node 15 deprecated that variable?

@lannonbr
Copy link
Member

Yep @Autre31415 is correct. I found an issue here in the NPM CLI that the INIT_CWD environment variable is no longer being set as of NPM 7.0.

kethinov added a commit to kethinov/roosevelt that referenced this issue Nov 14, 2020
- Fix for Node 15 / npm 7 regression. Config auditor and deprecation checker will no longer run as postinstall scripts to compensate for INIT_CWD being removed from npm. These checks will be run exclusively on application first run instead (or any time the public folder is removed). (Closes rooseveltframework#975)
- Various dependencies updated.
@kethinov kethinov mentioned this issue Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P1 Highest Priority
Development

Successfully merging a pull request may close this issue.

3 participants