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

I have an error npm ERR! code EINVALIDTYPE when npm install in react app #993

Closed
tmohammad78 opened this issue Mar 8, 2020 · 9 comments
Closed

Comments

@tmohammad78
Copy link

npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #2: Expected string but got null
npm ERR! typeerror at exports.findRequirement (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:752:3)
npm ERR! typeerror at findChild (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:122:17)
npm ERR! typeerror at computeMetadata (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:132:9)
npm ERR! typeerror at Installer.normalizeCurrentTree (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install.js:414:3)
npm ERR! typeerror at Array. (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
npm ERR! typeerror at LOOP (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
npm ERR! typeerror at C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\chain.js:18:7
npm ERR! typeerror at C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install.js:368:5
npm ERR! typeerror at C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\iferr\iferr.js:3:64
npm ERR! typeerror at asyncMap (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\async-map.js:27:18)
npm ERR! typeerror at exports.getAllMetadata (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:224:3)
npm ERR! typeerror at Installer.loadArgMetadata (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install.js:366:3)
npm ERR! typeerror at C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install.js:701:16
npm ERR! typeerror at C:\Users\USER\AppData\Roaming\npm\node_modules\npm\lib\install\read-shrinkwrap.js:33:16
npm ERR! typeerror at tryCatcher (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! typeerror at Promise._settlePromiseFromHandler (C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:517:31)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2020-03-08T18_03_24_062Z-debug.log

node version : v 13.10.1
npm version : v 6.14.2

@DanielRuf
Copy link

Hi @tmohammad78,

please provide the steps to reproduce this.

@tmohammad78
Copy link
Author

Hi @tmohammad78,

please provide the steps to reproduce this.

I have node on older version , by an error for installing typescript I installed new version node and upgrade it to 13.10.1 , and after that I started my react app it was without problem but again I saw this error and I re-installed but wasn't okay. I re-installed version 12 not worked

@ronpx
Copy link

ronpx commented Mar 20, 2020

I am having the same issue

PS D:\CPortal-PF> npm i  @angular/animation  hammerjs@2.0.8 --save
npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #2: Expected string but got null
npm ERR! typeerror     at exports.findRequirement (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:752:3)
npm ERR! typeerror     at findChild (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:122:17)
npm ERR! typeerror     at computeMetadata (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:139:11)
npm ERR! typeerror     at Installer.normalizeCurrentTree (C:\Program Files\nodejs\node_modules\npm\lib\install.js:414:3)
npm ERR! typeerror     at Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
npm ERR! typeerror     at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
npm ERR! typeerror     at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:18:7
npm ERR! typeerror     at C:\Program Files\nodejs\node_modules\npm\lib\install.js:368:5
npm ERR! typeerror     at C:\Program Files\nodejs\node_modules\npm\node_modules\iferr\iferr.js:3:64
npm ERR! typeerror     at cb (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:47:24)
npm ERR! typeerror     at C:\Program Files\nodejs\node_modules\npm\node_modules\call-limit\call-limit.js:28:43
npm ERR! typeerror     at processTicksAndRejections (internal/process/task_queues.js:79:11)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ronaldjayph\AppData\Roaming\npm-cache\_logs\2020-03-20T03_47_20_598Z-debug.log

@DanielRuf
Copy link

Which exact version of npm and node do you use?

@ronpx
Copy link

ronpx commented Mar 20, 2020

Which exact version of npm and node do you use?

This, also replied to another thread.

node -v - v12.16.0
npm -v 6.13.4

@DanielRuf
Copy link

Can not reproduce:

npm-issue-993 npm i  @angular/animation  hammerjs@2.0.8 --save
npm WARN saveError ENOENT: no such file or directory, open '/home/druf/Schreibtisch/npm-issue-993/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/druf/Schreibtisch/npm-issue-993/package.json'
npm WARN @angular/animation@4.0.0-beta.8 requires a peer of @angular/core@4.0.0-beta.8 but none is installed. You must install peer dependencies yourself.
npm WARN npm-issue-993 No description
npm WARN npm-issue-993 No repository field.
npm WARN npm-issue-993 No README data
npm WARN npm-issue-993 No license field.

+ hammerjs@2.0.8
+ @angular/animation@4.0.0-beta.8
added 2 packages from 4 contributors and audited 2 packages in 1.979s
found 0 vulnerabilities
node -v && npm -v
v10.16.0
6.13.4

@DanielRuf
Copy link

Not sure if this happens only on Windows.

@tmohammad78
Copy link
Author

for solve it i copied my package.json from another project and i got i had a problem in my package.json file

@DanielRuf
Copy link

Ok then please close the issue.

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

No branches or pull requests

3 participants