Monday, April 16, 2018

Troubleshooting with nodejs and npm


I got error when I tried to install rasa-nlu-trainer
$npm i -g rasa-nlu-trainer

error:
npm http GET https://registry.npmjs.org/express
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\main.js:409:26)
npm ERR!     at ClientRequest.g (events.js:185:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:88:17)

solution:
You can bypass https using below commands:
npm config set strict-ssl false

reference:
https://stackoverflow.com/questions/21855035/ssl-error-cert-untrusted-while-using-npm-command


-----------------------------------------------------

To update nodejs and npm:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs



-----------------------------------------------------

"/usr/bin/env: node: No such file or directory"


solution:
ln -s /usr/bin/nodejs /usr/bin/node

No comments:

Post a Comment

free online comma separating tool

https://delim.co/#