Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] This is an error with npm itself #2385

Closed
Sam-Manohar opened this issue Dec 19, 2020 · 2 comments
Closed

[BUG] This is an error with npm itself #2385

Sam-Manohar opened this issue Dec 19, 2020 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@Sam-Manohar
Copy link

Sam-Manohar commented Dec 19, 2020

Note: * Could not find a relevant one.

Current Behavior:

I am running "npm install googleapis@39 --save" in Terminal .vs
and receive this error:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'googleapis@39',
1 verbose cli '--save'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.15.1
4 verbose npm-session 6a484e0edf83f257
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/googleapis 820ms (from cache)
8 silly pacote range manifest for googleapis@39 fetched in 858ms
9 timing stage:loadCurrentTree Completed in 1008ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 2ms
13 silly install loadShrinkwrap
14 timing stage:rollbackFailedOptional Completed in 1ms
15 timing stage:runTopLevelLifecycles Completed in 1016ms
16 silly saveTree Bible Notes App
17 verbose stack Error: Argument #5: Expected object but got string
17 verbose stack at inflatableChild (C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:115:3)
17 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:63:12
17 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
17 verbose stack at Object.gotValue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:155:18)
17 verbose stack at Object.gotAccum (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:144:25)
17 verbose stack at Object.tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
17 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:517:31)
17 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:574:18)
17 verbose stack at Promise._settlePromiseCtx (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:611:10)
17 verbose stack at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
17 verbose stack at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
17 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5)
17 verbose stack at Immediate.Async.drainQueues [as onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
17 verbose stack at processImmediate (internal/timers.js:461:21)
18 verbose cwd C:\Users\ravi
\Documents\Bible Notes App
19 verbose Windows_NT 10.0.19042
20 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "googleapis@39" "--save"
21 verbose node v14.15.1
22 verbose npm v6.14.8
23 error code EINVALIDTYPE
24 error typeerror Error: Argument #5: Expected object but got string
24 error typeerror at inflatableChild (C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:115:3)
24 error typeerror at C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:63:12
24 error typeerror at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
24 error typeerror at Object.gotValue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:155:18)
24 error typeerror at Object.gotAccum (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:144:25)
24 error typeerror at Object.tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
24 error typeerror at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:517:31)
24 error typeerror at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:574:18)
24 error typeerror at Promise._settlePromiseCtx (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:611:10)
24 error typeerror at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
24 error typeerror at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
24 error typeerror at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5)
24 error typeerror at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
24 error typeerror at processImmediate (internal/timers.js:461:21)
25 error typeerror This is an error with npm itself. Please report this error at:
25 error typeerror https://npm.community
26 verbose exit [ 1, true ]

Expected Behavior:

Running the the above command should be successful.

Steps To Reproduce:

  1. Open VIsual Studio Code 1.52.1
  2. Open the Terminal window.
  3. (NPM 6.14.8 and Node 14.15.1 installed.)
  4. Run "npm install googleapis@39 --save"
  5. See the error as in "Current Behavior".

Environment:

  • OS: Windows 10 ver 20H2 OS Build: 19042.685
  • Node: 14.15.1
  • npm: 6.14.8
@Sam-Manohar Sam-Manohar added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Dec 19, 2020
@shwndea
Copy link

shwndea commented Dec 28, 2020

Bump I am having the same issue.

@Sam-Manohar
Copy link
Author

Sam-Manohar commented Dec 28, 2020

Update:
The issue was because there was already a package-lock.JSON file in my project folder. So I just removed it from the project directory. And then re-ran the npm command, now it works without any problems.
Note:Not sure but need to make sure we might not miss on other dependencies if we have other npm modules installed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants