Cannot find module ‘../lib/utils/unsupported.js’

What are the eight life cycle hook functions of Vue>>>

Error running NPM run clean:

    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)


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
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:
==> 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: