Skip to content

[BUG] "ERR! must provide string spec" when running "npm install" #2843

Closed
@6uzm4n

Description

@6uzm4n

Current Behavior:

When I run "npm install" in one specific project, I get the message:

npm ERR! must provide string spec

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/guzman/.npm/_logs/2021-03-09T09_43_59_525Z-debug.log

The log file:

0 verbose cli [
0 verbose cli   '/usr/local/bin/node',
0 verbose cli   '/home/guzman/.npm-global/bin/npm',
0 verbose cli   'install'
0 verbose cli ]
1 info using npm@7.6.1
2 info using node@v15.11.0
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/home/guzman/.npm-global/lib/node_modules/npm/npmrc Completed in 2ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/home/guzman/Walcu/MAPP-WebClient/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/home/guzman/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/home/guzman/.npm-global/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 9ms
19 verbose npm-session ad4e6429afd3d43d
20 timing npm:load Completed in 17ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree Completed in 4ms
23 timing command:install Completed in 18ms
24 verbose stack TypeError: must provide string spec
24 verbose stack     at new Edge (/home/guzman/.npm-global/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js:48:13)
24 verbose stack     at Node.[_loadDepType] (/home/guzman/.npm-global/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:771:9)
24 verbose stack     at Node.[Arborist.Node._loadDeps] (/home/guzman/.npm-global/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:758:23)
24 verbose stack     at new Node (/home/guzman/.npm-global/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:231:20)
24 verbose stack     at Arborist.[rootNodeFromPackage] (/home/guzman/.npm-global/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:355:18)
25 verbose cwd /home/guzman/Walcu/MAPP-WebClient
26 verbose Linux 5.9.16-1-MANJARO
27 verbose argv "/usr/local/bin/node" "/home/guzman/.npm-global/bin/npm" "install"
28 verbose node v15.11.0
29 verbose npm  v7.6.1
30 error must provide string spec
31 verbose exit 1

Expected Behavior:

The instalation happens normaly

Steps To Reproduce:

I'm running the command with a fresh install of node and npm. It works well in other projects.

Environment:

  • OS: Manjaro
  • Node: 15.11.0
  • npm: 7.6.1

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions