cannot find module inherits
I tried updating my Ionic Library using ionic update lib, but then it gave me some error which I can't remember. Then I tried running npm install -g ionic but then i got loads of errors:
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls gr aceful-fs' to find it in the tree. C:\Users\lilopel-06\AppData\Roaming\npm `-- (empty)
npm WARN In [email protected] replacing bundled version of semver with [email protected] npm WARN In [email protected] replacing bundled version of ionic-app-lib with [email protected] npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\lilopel-06\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "ionic" "-g" npm ERR! node v4.5.0 npm ERR! npm v3.10.8 npm ERR! path C:\Users\lilopel-06\AppData\Roaming\npm\node_modules.staging\ansi-89bf214f npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\lilopel-06\AppData\Roaming\npm\node_modules.staging\ansi-89bf214f' -> 'C:\Users\lilopel-06\AppData\Roaming
npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\lilopel-06\AppData\Roaming\npm\node_modules.staging\ansi-89bf214f' -> 'C:\Users\lilopel-06\AppData\Roaming
npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request: npm ERR! C:\Users\lilopel-06\OneDrive\myApp\npm-debug.log
npm ERR! code 1
and now im getting this: cannot find module inherits; everytime I try to use Ionic in my project
I have the same issue...
i have the same issue kindly suggest stable version
So I just went f*ck it and uninstalled everything, reinstalled everything and it was done without errors, and my app works again. Node.js 4.6 has been released a few days ago so try reinstalling node.js first
@sabre96 good call. First thing I would do is check the version of NodeJS and NPM. With the release of 2.1.0 the package.json is using a scoped package which only works with NPM 2.7+.
https://docs.npmjs.com/getting-started/scoped-packages
Try running the following commands to get the latest.
npm uninstall -g ionic
npm install -g [email protected]
Please let me know if this works for you.
For me the solution was to install latest version of NodeJs, and npm (Node v.6.7.0, npm v.3.10.0). Previously I had Node v.5.7.0, npm v.3.6.0
Hello all! As Josh mentioned above the solution to this issue is to install the latest version of npm. If you install Node 6 you will get the latest version of npm by default, but if you are on Node 4 you can update to npm 3 by running npm install -g npm. Thanks! Also, just a friendly reminder, Node 6 becomes the LTS release of Node this month, so updating to the latest Node 6 release is probably your best bet.