I have an Error when I run an Apache Cordova project from Visual Studio 2015 as below.
Error BLD401 Error : BLD00401 : Could not find module 'shelljs'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again.
I tried to install shelljs grobally
npm install -g shelljs
But still not working.
Should I convert it to PhoneGap project and work on other IDEs?
I found the solution that some reason the [-g] to install globally wasn't working. So what I did was installing the shelljs command in the project location as below.
Path To The Project\platforms\android\cordova
and then install "shelljs" at the location
npm install shelljs
Hope this help someone has the same issue.
For me worked setting first the NODE_PATH
:
export NODE_PATH=$(npm root -g)
npm install -g shelljs
I use macOS and I had the same problem within one of the microservices we work on.
This error can persist even when we run the command npm run shelljs.
So, What I had to do was:
Problem solved succesfully ! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With