Skip to content

[BUG] Cannot read properties of undefined (reading 'spec') #4819

Open

Description

@talatkuyuk

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I develop a nextjs application. I want to use react-table package specific version from github. I tried the below command in the terminal:

npm install git://github.com/tanstack/react-table.git#v8.0.0-alpha.51

It starts to download but stucked after a while and ended with the error Cannot read properties of undefined (reading 'spec')

Here is the npm log:

49 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-x64-msvc
50 silly reify mark deleted [
50 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-x64-msvc'
50 silly reify ]
51 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-ia32-msvc
52 silly reify mark deleted [
52 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-ia32-msvc'
52 silly reify ]
53 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-arm64-msvc
54 silly reify mark deleted [
54 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-win32-arm64-msvc'
54 silly reify ]
55 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-x64-musl
56 silly reify mark deleted [
56 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-x64-musl'
56 silly reify ]
57 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-x64-gnu
58 silly reify mark deleted [
58 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-x64-gnu'
58 silly reify ]
59 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm64-musl
60 silly reify mark deleted [
60 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm64-musl'
60 silly reify ]
61 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm64-gnu
62 silly reify mark deleted [
62 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm64-gnu'
62 silly reify ]
63 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm-gnueabihf
64 silly reify mark deleted [
64 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-linux-arm-gnueabihf'
64 silly reify ]
65 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-darwin-arm64
66 silly reify mark deleted [
66 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-darwin-arm64'
66 silly reify ]
67 verbose reify failed optional dependency /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-android-arm64
68 silly reify mark deleted [
68 silly reify   '/Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web/node_modules/@next/swc-android-arm64'
68 silly reify ]
69 timing reifyNode:node_modules/@next/swc-win32-x64-msvc Completed in 21ms
70 timing reifyNode:node_modules/@next/swc-win32-ia32-msvc Completed in 21ms
71 timing reifyNode:node_modules/@next/swc-win32-arm64-msvc Completed in 22ms
72 timing reifyNode:node_modules/@next/swc-linux-x64-musl Completed in 22ms
73 timing reifyNode:node_modules/@next/swc-linux-x64-gnu Completed in 22ms
74 timing reifyNode:node_modules/@next/swc-linux-arm64-musl Completed in 21ms
75 timing reifyNode:node_modules/@next/swc-linux-arm64-gnu Completed in 21ms
76 timing reifyNode:node_modules/@next/swc-linux-arm-gnueabihf Completed in 21ms
77 timing reifyNode:node_modules/@next/swc-darwin-arm64 Completed in 21ms
78 timing reifyNode:node_modules/@next/swc-android-arm64 Completed in 21ms
79 http fetch GET 200 https://codeload.github.com/tanstack/react-table/tar.gz/a642b36b4faff416d17a5a22a11682772afa2572 521ms (cache revalidated)
80 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 642ms
81 timing auditReport:getReport Completed in 651ms
82 silly audit report {
82 silly audit report   underscore: [
82 silly audit report     {
82 silly audit report       id: 1068134,
82 silly audit report       url: 'https://github.com/advisories/GHSA-cf4h-3jhx-xvhq',
82 silly audit report       title: 'Arbitrary Code Execution in underscore',
82 silly audit report       severity: 'high',
82 silly audit report       vulnerable_versions: '>=1.3.2 <1.12.1',
82 silly audit report       cwe: [Array],
82 silly audit report       cvss: [Object]
82 silly audit report     }
82 silly audit report   ]
82 silly audit report }
83 timing metavuln:cache:get:security-advisory:underscore:Gnjmi1IOOUemQLeLgz5wRwLH47Eo9UznXoQR7+paJUZ5akz/mDNxKZhNia4PfEO25soJ4Pui+zZrnP/UDRFcrg== Completed in 3ms
84 http fetch GET 200 https://registry.npmjs.org/underscore 99ms (cache revalidated)
85 timing metavuln:packument:underscore Completed in 99ms
86 timing metavuln:load:security-advisory:underscore:1068134 Completed in 1ms
87 timing metavuln:calculate:security-advisory:underscore:1068134 Completed in 101ms
88 timing metavuln:cache:get:security-advisory:nomnom:DQUhFjyX429qptn/n8Uhfq7YeZIdBe9/qacpIYBWZ2pIHThXVcKYs0RH5u7CWrWBHCMXnb5SXhAcRszvQ9hi6g== Completed in 2ms
89 http fetch GET 200 https://registry.npmjs.org/nomnom 89ms (cache revalidated)
90 timing metavuln:packument:nomnom Completed in 89ms
91 timing metavuln:load:security-advisory:nomnom:Gnjmi1IOOUemQLeLgz5wRwLH47Eo9UznXoQR7+paJUZ5akz/mDNxKZhNia4PfEO25soJ4Pui+zZrnP/UDRFcrg== Completed in 0ms
92 timing metavuln:calculate:security-advisory:nomnom:Gnjmi1IOOUemQLeLgz5wRwLH47Eo9UznXoQR7+paJUZ5akz/mDNxKZhNia4PfEO25soJ4Pui+zZrnP/UDRFcrg== Completed in 89ms
93 timing metavuln:cache:get:security-advisory:local-ssl-proxy:ofKTNzg2i4mGw/PKqqfCg/6pbQW50RjEeKeGZZ6obFI7sSCOXuX0wG4lQEigM0ScX2Nf8gr1Guioi7wIQ29fkQ== Completed in 2ms
94 http fetch GET 200 https://registry.npmjs.org/local-ssl-proxy 91ms (cache revalidated)
95 timing metavuln:packument:local-ssl-proxy Completed in 91ms
96 timing metavuln:load:security-advisory:local-ssl-proxy:DQUhFjyX429qptn/n8Uhfq7YeZIdBe9/qacpIYBWZ2pIHThXVcKYs0RH5u7CWrWBHCMXnb5SXhAcRszvQ9hi6g== Completed in 0ms
97 timing metavuln:calculate:security-advisory:local-ssl-proxy:DQUhFjyX429qptn/n8Uhfq7YeZIdBe9/qacpIYBWZ2pIHThXVcKYs0RH5u7CWrWBHCMXnb5SXhAcRszvQ9hi6g== Completed in 92ms
98 timing auditReport:init Completed in 286ms
99 timing reify:audit Completed in 937ms
100 timing reifyNode:node_modules/undefined Completed in 83750ms
101 timing reify:unpack Completed in 83752ms
102 timing reify:unretire Completed in 0ms
103 timing build:queue Completed in 49ms
104 timing build:deps Completed in 50ms
105 timing build Completed in 50ms
106 timing reify:build Completed in 51ms
107 timing reify:trash Completed in 1729ms
108 timing command:install Completed in 90889ms
109 verbose stack TypeError: Cannot read properties of undefined (reading 'spec')
109 verbose stack     at updateNodes (/Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1177:44)
109 verbose stack     at Arborist.[saveIdealTree] (/Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1344:11)
109 verbose stack     at Arborist.reify (/Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:156:31)
109 verbose stack     at async Install.exec (/Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/lib/commands/install.js:159:5)
109 verbose stack     at async module.exports (/Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/lib/cli.js:66:5)
110 verbose cwd /Users/talatkuyuk/MyCodeRepo/nextprojects/amazon-ht-web
111 verbose Darwin 19.6.0
112 verbose argv "/Users/talatkuyuk/.nvm/versions/node/v16.15.0/bin/node" "/Users/talatkuyuk/.nvm/versions/node/v16.15.0/bin/npm" "install" "git://github.com/tanstack/react-table.git#v8.0.0-alpha.51"
113 verbose node v16.15.0
114 verbose npm  v8.5.5
115 error Cannot read properties of undefined (reading 'spec')
116 verbose exit 1
117 timing npm Completed in 91074ms
118 verbose unfinished npm timer reify 1651116372524
119 verbose unfinished npm timer reify:save 1651116463410
120 verbose code 1
121 error A complete log of this run can be found in:
121 error     /Users/talatkuyuk/.npm/_logs/2022-04-28T03_26_12_342Z-debug-0.log

Expected Behavior

I expect the npm install the react-table package from GitHub

Steps To Reproduce

  1. It is nextjs application
  2. Run 'npm install git://github.com/tanstack/react-table.git#v8.0.0-alpha.51'
  3. See error...Cannot read properties of undefined (reading 'spec')

Environment

  • npm: v8.5.5
  • Node.js: v16.15.0
  • OS Name: MacBook Pro
  • System Model Name: Mac OS
  • npm config:
; node bin location = /Users/talatkuyuk/.nvm/versions/node/v16.15.0/bin/node
; cwd = /Users/talatkuyuk/.nvm/versions/node/v16.15.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist
; HOME = /Users/talatkuyuk
; Run `npm config ls -l` to show all defaults.

Activity

  1. added
    Bugthing that needs fixing
    Needs Triageneeds review for next steps
    Release 8.xwork is associated with a specific npm 8 release
    on Apr 28, 2022
  2. PedroC88 commented on Apr 28, 2022

    @PedroC88

    I'm having the same error installing ADF Utilities:

    package.json

    {
        "scripts": {
            "build": "node node_modules/@microsoft/azure-data-factory-utilities/lib/index"
        },
        "dependencies": {
            "@microsoft/azure-data-factory-utilities": "^0.1.5"
        }
    }
    

    npm version

    {
      npm: '8.8.0',
      node: '16.15.0',
      [...]
    }
    

    logs

    0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\username\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
    1 info using npm@8.8.0
    2 info using node@v16.15.0
    3 timing npm:load:whichnode Completed in 0ms
    4 timing config:load:defaults Completed in 2ms
    5 timing config:load:file:C:\Users\username\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
    6 timing config:load:builtin Completed in 3ms
    7 timing config:load:cli Completed in 1ms
    8 timing config:load:env Completed in 1ms
    9 timing config:load:file:C:\Users\username\source\repos\project\.npmrc Completed in 0ms
    10 timing config:load:project Completed in 2ms
    11 timing config:load:file:C:\Users\username\.npmrc Completed in 0ms
    12 timing config:load:user Completed in 1ms
    13 timing config:load:file:C:\Users\username\AppData\Roaming\npm\etc\npmrc Completed in 0ms
    14 timing config:load:global Completed in 0ms
    15 timing config:load:validate Completed in 0ms
    16 timing config:load:credentials Completed in 1ms
    17 timing config:load:setEnvs Completed in 1ms
    18 timing config:load Completed in 12ms
    19 timing npm:load:configload Completed in 12ms
    20 timing npm:load:mkdirpcache Completed in 1ms
    21 timing npm:load:mkdirplogs Completed in 0ms
    22 verbose title npm install .\pipelines\
    23 verbose argv "install" ".\\pipelines\\"
    24 timing npm:load:setTitle Completed in 2ms
    25 timing config:load:flatten Completed in 3ms
    26 timing npm:load:display Completed in 5ms
    27 verbose logfile logs-max:10 dir:C:\Users\username\AppData\Local\npm-cache\_logs
    28 verbose logfile C:\Users\username\AppData\Local\npm-cache\_logs\2022-04-28T14_42_58_414Z-debug-0.log
    29 timing npm:load:logFile Completed in 6ms
    30 timing npm:load:timers Completed in 0ms
    31 timing npm:load:configScope Completed in 0ms
    32 timing npm:load Completed in 27ms
    33 timing arborist:ctor Completed in 1ms
    34 silly logfile start cleaning logs, removing 2 files
    35 timing arborist:ctor Completed in 0ms
    36 silly logfile done cleaning log files
    37 timing idealTree:init Completed in 13ms
    38 timing idealTree:userRequests Completed in 5ms
    39 silly idealTree buildDeps
    40 silly placeDep ROOT undefined@ OK for:  want: file:pipelines
    41 timing idealTree:#root Completed in 7ms
    42 timing idealTree:node_modules/undefined Completed in 0ms
    43 silly fetch manifest @microsoft/azure-data-factory-utilities@^0.1.5
    44 http fetch GET 200 https://registry.npmjs.org/@microsoft%2fazure-data-factory-utilities 18ms (cache hit)
    45 silly placeDep ROOT @microsoft/azure-data-factory-utilities@0.1.6 OK for: pipelines want: ^0.1.5
    46 silly fetch manifest commander@6.2.0
    47 http fetch GET 200 https://registry.npmjs.org/commander 9ms (cache hit)
    48 timing idealTree:pipelines Completed in 38ms
    49 silly placeDep ROOT commander@6.2.0 OK for: @microsoft/azure-data-factory-utilities@0.1.6 want: 6.2.0
    50 timing idealTree:node_modules/@microsoft/azure-data-factory-utilities Completed in 3ms
    51 timing idealTree:node_modules/commander Completed in 0ms
    52 timing idealTree:buildDeps Completed in 49ms
    53 timing idealTree:fixDepFlags Completed in 1ms
    54 timing idealTree Completed in 69ms
    55 timing reify:loadTrees Completed in 70ms
    56 timing reify:diffTrees Completed in 1ms
    57 silly reify moves {}
    58 timing reify:retireShallow Completed in 1ms
    59 timing reify:createSparse Completed in 3ms
    60 timing reify:loadBundles Completed in 0ms
    61 silly audit bulk request {
    61 silly audit   '@microsoft/azure-data-factory-utilities': [ '0.1.6' ],
    61 silly audit   commander: [ '6.2.0' ]
    61 silly audit }
    62 timing reifyNode:node_modules/undefined Completed in 28ms
    63 timing reifyNode:node_modules/@microsoft/azure-data-factory-utilities Completed in 56ms
    64 timing reifyNode:node_modules/commander Completed in 58ms
    65 timing reify:unpack Completed in 58ms
    66 timing reify:unretire Completed in 0ms
    67 timing build:queue Completed in 1ms
    68 timing build:deps Completed in 1ms
    69 timing build:queue Completed in 0ms
    70 timing build:links Completed in 0ms
    71 timing build Completed in 1ms
    72 timing reify:build Completed in 1ms
    73 timing reify:trash Completed in 0ms
    74 timing command:install Completed in 153ms
    75 verbose stack TypeError: Cannot read properties of undefined (reading 'spec')
    75 verbose stack     at updateNodes (C:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:1177:44)
    75 verbose stack     at Arborist.[saveIdealTree] (C:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:1344:11)
    75 verbose stack     at Arborist.reify (C:\Users\username\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:156:31)
    75 verbose stack     at async Install.exec (C:\Users\username\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:156:5)
    75 verbose stack     at async module.exports (C:\Users\username\AppData\Roaming\npm\node_modules\npm\lib\cli.js:78:5)
    76 verbose cwd C:\Users\username\source\repos\project
    77 verbose Windows_NT 10.0.22000
    78 verbose node v16.15.0
    79 verbose npm  v8.8.0
    80 error Cannot read properties of undefined (reading 'spec')
    81 verbose exit 1
    82 timing npm Completed in 295ms
    83 verbose unfinished npm timer reify 1651156978554
    84 verbose unfinished npm timer reify:audit 1651156978639
    85 verbose unfinished npm timer auditReport:getReport 1651156978640
    86 verbose unfinished npm timer reify:save 1651156978704
    87 verbose code 1
    88 error A complete log of this run can be found in:
    88 error     C:\Users\username\AppData\Local\npm-cache\_logs\2022-04-28T14_42_58_414Z-debug-0.log
    
  3. PedroC88 commented on Apr 28, 2022

    @PedroC88

    Alright, so here's a bit more detail, perhaps it's a layer-8 error?

    • With the package.json at the root label the npm install command runs successfully
    • With the package.json file in the pipelines folder and running npm install from the pipelines folder it runs successfully
    • With the package.json file in the pipelines folder and running npm install .\pipelines from the root folder it fails

    I also realized that even with the error the packages are (or appear to be) restored.

    P.S. this is all running on a Windows 11 Terminal with a PowerShell 7.2.3 session

  4. Jeremy-coding commented on Aug 27, 2022

    @Jeremy-coding

    I'm also getting this error. I'm on npm 8.11.0.

    $ npm install https://github.com/JeremyEllingham/webassemblyjs --loglevel verbose
    
    ...
    npm timing reify:trash Completed in 165ms
    npm timing command:install Completed in 129049ms
    npm verb stack TypeError: Cannot read properties of undefined (reading 'spec')
    npm verb stack     at updateNodes (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1178:44)
    npm verb stack     at Arborist.[saveIdealTree] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:1345:11)
    npm verb stack     at Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:156:31)
    npm verb stack     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:156:5)
    npm verb stack     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli.js:78:5)
    npm verb cwd /Users/jeremy/project/selene-wallet
    npm verb Darwin 21.6.0
    npm verb node v16.16.0
    npm verb npm  v8.11.0
    npm ERR! Cannot read properties of undefined (reading 'spec')
    npm verb exit 1
    npm timing npm Completed in 129220ms
    npm verb unfinished npm timer reify 1661607103046
    npm verb unfinished npm timer reify:save 1661607232091
    npm verb code 1
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/jeremy/.npm/_logs/2022-08-27T13_31_42_874Z-debug-0.log
    

    Should be reproducible for anyone else.

  5. WilcoFiers commented on Sep 5, 2022

    @WilcoFiers

    Had this issue too. The problem turned out to come from package.json not having a name property. Adding that in solved the issue for me.

  6. corngood commented on Sep 5, 2022

    @corngood

    For me, this was caused by having node.exe next to package.json in the root of our tree. Moving it into any other directory fixed the problem. NPM treats wherever the node binary lives as the 'distro root' and does some special magic.

  7. daniel-rebolledo commented on Oct 13, 2022

    @daniel-rebolledo

    I have the same problem, in my case running npm install react react-dom. On my package.json I have these two packages as peerDependencies, if I move those to devDependencies and then run npm install the error is gone and all the packages are installed. I always have to move back those packages to peerDependencies after that.

    npm: 8.11.0
    node: 16.15.1

  8. prathyushSunny commented on Oct 14, 2022

    @prathyushSunny

    @daniel-rebolledo Thanks! Your approached resolved it. I had the same issue while doing npm i react but not anymore.

  9. que273 commented on Oct 21, 2022

    @que273

    I appear to have the same issue as @daniel-rebolledo with peerDependencies. Oddly for me it was working with registry.npmjs.org but not when I switched to a private mirror registry. The issue went away when I specified the //legacy-peer-deps=true option to the registry in .npmrc

  10. Shhad commented on Nov 11, 2022

    @Shhad

    @que273 yes! I have same config field in .npmrc . Do you know why it behaves like that?

  11. zloirock commented on Nov 12, 2022

    @zloirock

    I have this issue after moving cd path && npm i -> npm i --prefix path, https://github.com/zloirock/core-js/actions/runs/3452139442/jobs/5761893828, diff: zloirock/core-js@e503cc2

  12. JonathanMerklin commented on Mar 22, 2023

    @JonathanMerklin

    Thought I'd call out that I was experiencing this when migrating a module (in our internal registry) to be built in and compatible with Node 18 / the latest NPM (the module had been around since the Node 0.x days, and its purpose was "install this one package as a devDependency in order to get a bunch of unit testing tooling packages at once") and was receiving this when trying to install chai-enzyme regardless of whether it was a peer or dev dependency.

    Fortunately, for us, we weren't really "using" chai-enzyme in the module or in anything we owned, so we were able to just throw in the migration guide "no longer including chai-enzyme, and since you should prefer <alternativeMoreModernLibrariesAndMechanismsForUnitTestingWeAreUsingInOtherPlaces />, if you are using chai-enzyme in your extant test code, you're on your own".

    The point: if you're running into this, you could try removing individual packages one-at-a-time (and then in pairs, and then in triplets, etc.) until you no longer see this behavior, to isolate a problem dependency or set thereof, but from there the prescription would be entirely context-dependent.

  13. ph3rro commented on Mar 27, 2023

    @ph3rro

    I have this issue when I fork a package. The original package installs fine, but the forked version doesn't.

    Original version: https://github.com/BenJeau/react-native-draw
    Forked version: https://github.com/sickopickle/react-native-draw

    I made no changes so I don't know why this would happen.

  14. ami-momo commented on Sep 8, 2024

    @ami-momo

    This happened to me when I wanted to use npx somecommand from my package, but my package did not have the name property in package.json and caused this error:

    npm error Cannot read properties of undefined (reading 'spec')
    

    Though bunx did not have any problem, but it seems it caused error using npx

  15. mwaibel-go commented on Nov 26, 2024

    @mwaibel-go

    I’m currently facing this issue with npm version 10.9.1. I have no idea what might be causing this in my case.

  16. wu-lee commented on Jan 7, 2026

    @wu-lee

    I'm seeing this error too.

    Situation: installing a package directly from GitHub.

    npm install <account name>/<repo name>#<commit-id>
    

    Versions:

    npm --version
    11.5.1
    node --version
    v24.7.0
    

    Same error, but the message "A complete log of this run can be found in" references a non-existing file.

    The installed package is one with workspaces, which have "name" and "version" attributes, and but the top-level package.json does not have the "name" attribute. (It is not marked private.)

    Adding "name" to the top-level package.json leads to a failure with:

    npm error Invalid Version:
    

    (No value given after "Version")

    But adding a "version" attribute does get to a successful install!

    So it does appear to be that the code is making unguarded assumptions about the package.json fields present.

    There are still some warnings, which may be unrelated:

    npm warn ERESOLVE overriding peer dependency
    npm warn While resolving: @swc-node/core@1.14.1
    npm warn Found: @swc/core@1.5.29
    npm warn node_modules/@swc/core
    npm warn   dev @swc/core@"~1.5.7" from the root project
    npm warn   2 more (@swc-node/register, nx)
    npm warn
    npm warn Could not resolve dependency:
    npm warn peer @swc/core@">= 1.13.3" from @swc-node/core@1.14.1
    npm warn node_modules/@swc-node/register/node_modules/@swc-node/core
    npm warn   @swc-node/core@"^1.13.1" from @swc-node/register@1.9.2
    npm warn   node_modules/@swc-node/register
    npm warn
    npm warn Conflicting peer dependency: @swc/core@1.15.8
    npm warn node_modules/@swc/core
    npm warn   peer @swc/core@">= 1.13.3" from @swc-node/core@1.14.1
    npm warn   node_modules/@swc-node/register/node_modules/@swc-node/core
    npm warn     @swc-node/core@"^1.13.1" from @swc-node/register@1.9.2
    npm warn     node_modules/@swc-node/register
    
  17. added
    Priority 2secondary priority issue
    and removed
    Priority 2secondary priority issue
    on Oct 21, 2026
  18. mvanhorn commented on Oct 22, 2026

    @mvanhorn
    Contributor

    An add spec that arrives without a name is meant to take that name from the fetched manifest. When the manifest name is missing or an empty string, the dependency is stored under the key "undefined" and no outgoing edge is created.

    After the manifest is loaded, a spec that still has no name and whose manifest name is missing or empty throws EMISSINAME, carrying the raw spec, before that dependency is recorded. Explicit-request collection adds an edge only when edgesOut returns one.

    #10154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsPriority 3Release 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions