I tried to install mongoose on my project using npm install mongoose but the terminal say..
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/kimmy/.npm/_logs/2023-01-27T13_01_37_127Z-debug.log
**Here is the log error**
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/kimmy/.nvm/versions/node/v14.21.2/bin/node',
1 verbose cli '/home/kimmy/.nvm/versions/node/v14.21.2/bin/npm',
1 verbose cli 'install',
1 verbose cli 'mongoose'
1 verbose cli ]
2 info using npm#6.14.17
3 info using node#v14.21.2
4 verbose npm-session 8ab7c7a226abac11
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/mongoose 105321ms
8 timing npm Completed in 139026ms
9 error cb() never called!
10 error This is an error with npm itself. Please report this error at:
11 error <https://npm.community>
my nodejs version is: **v10.19.0**
my npm version is: **6.14.17**
I tried deleting the nodejs module and package.json.lock and reinstall npm
Related
I have installed ReactJS to work on some project but this mistakes are making me sick.
First error appear when I tried to add package for my project.
So , I used :
yarn add #material-ui/icons
and after that It was fetching.
And I got this error message on the terminal line :
error An unexpected error occurred: "EPERM: operation not permitted, unlink 'C:\\React\\MyProject\\node_modules\\node-sass\\vendor\\win32-x64-93\\bindiinfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
I found some solutions and wanted to try. Whenever I try to use install command, it does not let me.
It gives this error
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\XXXXXX\AppData\Roaming\npm-cache\_logs\2021-11-14T00_08_12_781Z-debug.log
enter code here
and whenever I click this error log, here is what I see.
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:\\Users\\XXXXXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'yarn'
1 verbose cli ]
2 info using npm#5.3.0
3 info using node#v16.13.0
4 verbose npm-session 95556b4f7a104717
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/yarn 188ms
8 http fetch GET 200 https://registry.npmjs.org/yarn/-/yarn-1.22.17.tgz 120ms
9 silly pacote tag manifest for yarn#latest fetched in 352ms
10 verbose stack TypeError: cb.apply is not a function
10 verbose stack at C:\Users\XXXXXXX\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
10 verbose stack at FSReqCallback.oncomplete (node:fs:199:5)
11 verbose cwd D:\React\projem
12 verbose Windows_NT 10.0.19043
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\XXXXXXXX\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yarn"
14 verbose node v16.13.0
15 verbose npm v5.3.0
16 error cb.apply is not a function
17 verbose exit [ 1, true ]
Please help me or I'll drive crazy so soon!
All the best everyone and THANK YOU! for your help.
Please stop the development server and install or add the packages.
I faced same issue when I tried to install the blueprint package using yarn, I solved it by using npm package manager (npm install)
Firstly, I am new to using npm AND react JS and the like so be gentle lol. I am having a great deal of trouble creating a new react application using the npm CLI in Visual Studio Code. The error log text is below in full:
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 'create-react-app#latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli 'C:\\Users\\xxxx\\AppData\\Roaming\\npm-cache\\_npx\\7488',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm#6.14.6
3 info using node#v12.18.3
4 verbose npm-session aeaef96635f9906e
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://github.com/npm/npm-registry-couchapp/create-react-app 458ms
8 http fetch GET 404 https://github.com/npm/npm-registry-couchapp/create-react-app 177ms
9 silly fetchPackageMetaData error for create-react-app#latest 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 804ms
12 verbose stack Error: 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
12 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:114:15
12 verbose stack at processTicksAndRejections (internal/process/task_queues.js:97:5)
13 verbose statusCode 404
14 verbose pkgid create-react-app#latest
15 verbose cwd C:\Users\xxxx\Documents\Development\Courses\JavaScript\react_todo
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app#latest" "--global" "--prefix" "C:\\Users\\xxxx\\AppData\\Roaming\\npm-cache\\_npx\\7488" "--loglevel" "error" "--json"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code E404
21 error 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
22 error 404
23 error 404 'create-react-app#latest' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]
Obviously I can see that the github path it is trying to reach with the GET request does not exist and I have looked on quite a number of sites for this issue and everything I have tried so far has failed to fix the issue.
I have tried: npm uninstall -g followed by npm install -g create-react-app
I have tried clearing the npm cache using npm cache clean --force
Basically I am at loss and would truly greatly appreciate any guidance offered.
Thanks in advance!
Dan
EDIT: The below is the text i get when i run the npx create-react-app myApp
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/create-react-app - Not Found
npm ERR! 404
npm ERR! 404 'create-react-app#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xxxx\AppData\Roaming\npm-cache\_logs\2020-08-03T13_11_39_879Z-debug.log
Install for [ 'create-react-app#latest' ] failed with code 1
The issue was the wrong registrty was being pointed at. Fixed with npm config set registry https://registry.npmjs.com/ run from a prompt or terminal. Thanks for those who attempted to help.
Ciao, if you want to create an app from npm, try:
npm init react-app my-app
there is also a way using yarn:
yarn create react-app my-app
Check here for more info about create an app with create-react-app.
I have a little problem when installing angular/cli on my computer. I´ve installed latest stable version of Node.js (currently v. 10.16.0 with npm 6.9.0). Installation finished successfully without any problem.
After installation I've tried to install angular/cli in command prompt and I get this error.
npm ERR! code E400
npm ERR! 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\h053z9rc\AppData\Roaming\npm-cache\_logs\2019-07-09T05_03_06_062Z-debug.log
and in the log file are these informations
0 info it worked if it ends with ok
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 '-g',
1 verbose cli '#angular/cli' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose npm-session 336717238679caae
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 400 https://registry.npmjs.org/#angular%2fcli 141ms
8 silly fetchPackageMetaData error for #angular/cli#latest 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 177ms
11 verbose stack Error: 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
11 verbose stack at res.buffer.catch.then.body (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15)
11 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
12 verbose statusCode 400
13 verbose pkgid #angular/cli#latest
14 verbose cwd C:\Windows\System32
15 verbose Windows_NT 10.0.15063
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "#angular/cli"
17 verbose node v10.16.0
18 verbose npm v6.9.0
19 error code E400
20 error 400 Bad Request - GET https://registry.npmjs.org/#angular%2fcli
21 verbose exit [ 1, true ]
I've tried to reinstall node.js but it didn't help.
Try the Below :
Option 1
Open Command prompt as admin
npm uninstall -g #angular/cli
npm cache clean
npm config set strict-ssl false
npm install -g #angular/cli
OR :
Option 2
Open Command prompt as admin
npm uninstall -g #angular/cli
npm cache clean
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
npm config set strict-ssl false
npm install -g #angular/cli
If you get the error reason: write EPROTO try,
npm config set proxy="http://proxy.example.com:8080"
npm config set https-proxy="http://proxy.example.com:8080"
Follow Option 2
If all the above fails try to install the latest stable version of node & npm.
Try using these commands sequentially.
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli
I'm facing a problem when I install Nodejs v12.6.0 in Windows 10 Pro. I can get the version of Node normally, but when I run the command to get the version of NPM, it gives me an error. Then I cannot run my Node application in this machine because of this error.
// This is ok
C:\Windows\System32>node -v
v12.6.0
// But this gives me an error like below
C:\Windows\System32>npm -v
RangeError [ERR_INVALID_ASYNC_ID]: Invalid asyncId value: 27
at validateAsyncId (internal/async_hooks.js:119:16)
at emitAfterScript (internal/async_hooks.js:360:3)
at processTicksAndRejections (internal/process/task_queues.js:83:7)
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-07-10T04_26_39_285Z-debug.log
6.9.0
And log file:
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 'prefix',
1 verbose cli '-g'
1 verbose cli ]
2 info using npm#6.9.0
3 info using node#v12.6.0
4 timing npm Completed in 201ms
5 error cb() never called!
6 error This is an error with npm itself. Please report this error at:
7 error <https://npm.community>
I also reinstalled Node and Windows OS, but this issue is not fixed.
Please help me.
Finally I figured out my problem, that was about CPU. It did not work fine, something was wrong in Windows 64-bit platform (a few of other 64-bit software worked not so well also). And then, I had to replace a new CPU and now the error above disappears.
Hope this information can help somebody.
I am new to ionic and i am still trying to install it. Everytime i write an ionic command like npm install -g ionic cordova i receive this error
npm ERR! Unexpected end of JSON input while parsing near '...de":"0.6.2","express"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DwayneT\AppData\Roaming\npm-cache\_logs\2019-05-31T01_51_23_542Z-debug.log
'
this is my log file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli
'C:\\Users\\DwayneT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-
cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'ionic',
1 verbose cli 'cordova' ]
2 info using npm#6.9.0
3 info using node#v8.11.1
4 verbose npm-session bf0a16c3729a6897
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 http://registry.npmjs.org/cordova 1407ms (from cache)
8 silly fetchPackageMetaData error for cordova#latest Unexpected end of JSON
input while parsing near '...de":"0.6.2","express"'
9 http fetch GET 304 http://registry.npmjs.org/ionic 1418ms (from cache)
10 silly pacote tag manifest for ionic#latest fetched in 1452ms
11 timing stage:rollbackFailedOptional Completed in 1ms
12 timing stage:runTopLevelLifecycles Completed in 1466ms
13 verbose stack SyntaxError: Unexpected end of JSON input while parsing
near '...de":"0.6.2","express"'
13 verbose stack at JSON.parse (<anonymous>)
13 verbose stack at parseJson
(C:\Users\DwayneT\AppData\Roaming\npm\node_modules\npm\node_modules\json-
parse-better-errors\index.js:7:17)
13 verbose stack at consumeBody.call.then.buffer
(C:\Users\DwayneT\AppData\Roaming\npm\node_modules\npm\node_modules\node-
fetch-npm\src\body.js:96:50)
13 verbose stack at <anonymous>
13 verbose stack at process._tickCallback
(internal/process/next_tick.js:188:7)
14 verbose cwd C:\Users\DwayneT
15 verbose Windows_NT 10.0.18362
16 verbose argv "C:\\Program Files\\nodejs\\node.exe"
"C:\\Users\\DwayneT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-
cli.js" "install" "-g" "ionic" "cordova"
17 verbose node v8.11.1
18 verbose npm v6.9.0
19 error Unexpected end of JSON input while parsing near
'...de":"0.6.2","express"'
20 verbose exit [ 1, true ]
I have tried many solutions including
npm cache clean --force
but nothing seems to work and i am now now. Kindly assist please. I am using node v 8
It is the problem with npm corrupt caches. You can clear it using npm itself.
I solved it with
npm cache clean --force
then update npm
npm i npm#latest -g
then normally use your npm install command
npm install
Try run npm cache clean --force then re-run your command, I hope this fix this issue for you.
Try cleaning the npm cache use the below command. This will clean your existing npm entries and start from the beginning. I think the one file may be corrupt during the installation that's why you are facing this issue.
npm cache clean
Then try
npm install ionic -g
I've faced the problem.
when you uninstalled node js or delete the npm global packages or install the node js in a new machine that error will have occurred.
Please install global npm packages after installing the npm install or npm i
For Example My Case I've uninstalled npm global package. When I installed npm install, an error occurred.
You should clear the npm cache files manually by going to
C:\Users[Username]\AppData\Roaming\npm-cache
change [user
I've resolved this issue in the following way:
npm cache clean --force
and
npm cache verify
then
npm i npm#latest -g
and finally, I was able to run
npm i