-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release
Description
Hello! I've downloaded LTS and latest versions of Node.js from https://nodejs.org/en/, unarchived that:
sudo tar -xvf node.tar.xz -C /opt/
than copied links:
sudo cp /opt/node/bin/node /opt/node/bin/npm /usr/bin/
when I try node -v, it works.
But with npm -v I get:
internal/modules/cjs/loader.js:1083
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
Require stack:
- /usr/bin/npm
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15)
at Function.Module._load (internal/modules/cjs/loader.js:923:27)
at Module.require (internal/modules/cjs/loader.js:1140:19)
at require (internal/modules/cjs/helpers.js:75:18)
at /usr/bin/npm:19:21
at Object.<anonymous> (/usr/bin/npm:155:3)
at Module._compile (internal/modules/cjs/loader.js:1251:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Module.load (internal/modules/cjs/loader.js:1100:32)
at Function.Module._load (internal/modules/cjs/loader.js:962:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/bin/npm' ]
}
I tried to remove everything and install it with apt (I use Ubuntu):
sudo apt install nodejs
sudo apt install npm
I get the same problem.
I tried to create a symbolik link, it didn't work also:
sudo ln /opt/node/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npm
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release