What are the eight life cycle hook functions of Vue>>>
Error running NPM run clean:
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
Solution:
sudo rm -rf /usr/local/lib/node_modules/npm
Delete the previous file first
userdeMBP:~ user$ brew uninstall --force node
Error: Refusing to uninstall /usr/local/Cellar/node/11.1.0
because it is required by yarn, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies node
Then delete the node, because I have installed yard, so I use — ignore dependencies:
userdeMBP:~ user$ brew uninstall --ignore-dependencies node
Uninstalling /usr/local/Cellar/node/11.1.0... (3,936 files, 47.0MB)
node 9.10.1 is still installed.
Remove all versions with `brew uninstall --force node
Then install:
userdeMacBook-Pro:~ user$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-11.1.0.mojave.bottle.t
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/2d71518883b6f6ce458778abea35981525ecdee4a14408431b9f42ed132015e1--node-11.1.0.mojave.bottle.tar.gz
==> Pouring node-11.1.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node/11.1.0: 3,936 files, 47.0MB
And then it worked:
userdeMacBook-Pro:~ user$ npm
Usage: npm <command>
where <command> is one of:
...
Similar Posts:
- Completely Uninstall Node.js from Mac OS X
- NPM Install vue-cli Error: internal/modules/cjs/loader.js (Error: Cannot find module ‘D:\Program\nodejs\node_global\node_modules\vue-cli\bin\vue’)
- [Solved] Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Vue installs less Error: Failed to compile with 1 errors
- Mac download wepy error reporting solution
- Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x
- How to Solve Error Permission denied when running brew cleanup
- How to Solve Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor’
- Module build failed: Error: Cannot find module ‘node-sass’
- Solve Error: MissingSchemaError: Schema hasn’t been registered for model “YourModel”.