I have downloaded the nodejs repository from nodejs website and I want to install it via node file in bin directory and I want to install it with gdebi or software installer app but the error is: for gdebi and for software installer actually I have checked the permissions and activated them and this is the error while I run npx create-react-app name
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module 'ini'
Require stack:
- /usr/share/nodejs/@npmcli/config/lib/index.js
- /usr/share/nodejs/npm/lib/utils/config/definition.js
- /usr/share/nodejs/npm/lib/utils/config/definitions.js
- /usr/share/nodejs/npm/lib/utils/config/flatten.js
- /usr/share/nodejs/npm/lib/utils/config/index.js
- /usr/share/nodejs/npm/bin/npx-cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/share/nodejs/@npmcli/config/lib/index.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/share/nodejs/@npmcli/config/lib/index.js',
'/usr/share/nodejs/npm/lib/utils/config/definition.js',
'/usr/share/nodejs/npm/lib/utils/config/definitions.js',
'/usr/share/nodejs/npm/lib/utils/config/flatten.js',
'/usr/share/nodejs/npm/lib/utils/config/index.js',
'/usr/share/nodejs/npm/bin/npx-cli.js'
]
}
CodePudding user response:
- that's just an archive file, not a debian package so dont try to open it with a package manager
- it looks like you downloaded an arm version of nodejs, are you sure you are on arm ?
CodePudding user response:
if you don't need that specific version of nodejs, you can install it threw the command line apt install nodejs -y