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

Can't run npm update #1698

Closed
xylo04 opened this issue Feb 14, 2023 · 1 comment · Fixed by #1699
Closed

Can't run npm update #1698

xylo04 opened this issue Feb 14, 2023 · 1 comment · Fixed by #1699

Comments

@xylo04
Copy link
Member

xylo04 commented Feb 14, 2023

I'm getting an error when trying to run npm update at 82cb2c9 with npm 9.3.1 and node 18.14.0:

...
6387 timing reifyNode:node_modules/google-gax/node_modules/@grpc/grpc-js Completed in 412ms
6388 timing reifyNode:node_modules/jose Completed in 417ms
6389 timing reifyNode:node_modules/google-gax Completed in 445ms
6390 timing reifyNode:node_modules/caniuse-lite Completed in 455ms
6391 timing reify:unpack Completed in 462ms
6392 timing command:update Completed in 34524ms
6393 verbose stack TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
6393 verbose stack     at new NodeError (node:internal/errors:399:5)
6393 verbose stack     at validateString (node:internal/validators:163:11)
6393 verbose stack     at relative (node:path:1191:5)
6393 verbose stack     at /home/chris/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1093:21
6393 verbose stack     at Array.map (<anonymous>)
6393 verbose stack     at /home/chris/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1091:66
6393 verbose stack     at Array.map (<anonymous>)
6393 verbose stack     at [rollbackMoveBackRetiredUnchanged] (/home/chris/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1091:8)
6393 verbose stack     at [reifyPackages] (/home/chris/.nvm/versions/node/v18.14.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:239:31)
6393 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
6394 verbose cwd /home/chris/src/k0swe/forester
6395 verbose Linux 6.0.12-76060006-generic
6396 verbose node v18.14.0
6397 verbose npm  v9.3.1
6398 error code ERR_INVALID_ARG_TYPE
6399 error The "from" argument must be of type string. Received undefined
6400 verbose exit 1
6401 timing npm Completed in 34551ms
6402 verbose unfinished npm timer reify 1676390457583
6403 verbose unfinished npm timer reify:audit 1676390491621
6404 verbose unfinished npm timer auditReport:getReport 1676390491621
6405 verbose unfinished npm timer reify:unretire 1676390492102
6406 verbose code 1
6407 error A complete log of this run can be found in:
6407 error     /home/chris/.npm/_logs/2023-02-14T16_00_57_558Z-debug-0.log

Seems like maybe this is a bug in either reify or node itself? relative (node:path:1191:5) is trying to validateString but is actually passing undefined.

This is reproducing both in GitHub actions as well as on my workstation with identical results, so I don't think it's a local installation issue.

@xylo04
Copy link
Member Author

xylo04 commented Feb 14, 2023

This looks like npm/cli#4907.

xylo04 added a commit that referenced this issue Feb 14, 2023
Fixes #1698. Works around the issue by deleting and regenerating package-lock.json
@xylo04 xylo04 mentioned this issue Feb 14, 2023
xylo04 added a commit that referenced this issue Feb 14, 2023
Fixes #1698. Works around the issue by deleting and regenerating package-lock.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant