Npm erro EPRM errno -1 in android - android

npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../detect-libc/bin/detect-libc.js
npm ERR! dest /storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../detect-libc/bin/detect-libc.js' -> '/storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc'
npm ERR! [OperationalError: EPERM: operation not permitted, symlink '../detect-libc/bin/detect-libc.js' -> '/storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc'] {
npm ERR! cause: [Error: EPERM: operation not permitted, symlink '../detect-libc/bin/detect-libc.js' -> '/storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../detect-libc/bin/detect-libc.js',
npm ERR! dest: '/storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc'
npm ERR! },
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../detect-libc/bin/detect-libc.js',
npm ERR! dest: '/storage/emulated/0/ASTRO/projects/PokeXD/node_modules/.bin/detect-libc',
npm ERR! parent: 'PokeXD'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.astrosohu/files/home/.npm/_logs/2020-11-12T05_56_31_566Z-debug.log
$ root/Administrator
bash: root/Administrator: No such file or direc
Thats the error showing when i try to install
npm install quick.db
Android and i am using ASTRO App can be found in Play Store
Also when I try to install pm2
Then also similar thing happened and i cant even find solution for it so please help me

Related

Termux - npm ERR! Error: EPERM: operation not permitted, symlink

Whenever I install a npm-package (like: Puppeteer, Nightmare, Playwright) I get the same error message;
But it isn't shown up when I install the npm-packages (axios, http, axios, etc.) almost all minor packages...!
npm install playwright:
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../playwright/cli.js
npm ERR! dest /storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../playwright/cli.js' -> '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'
npm ERR! [Error: EPERM: operation not permitted, symlink '../playwright/cli.js' -> '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../playwright/cli.js',
npm ERR! dest: '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-08-10T13_22_34_261Z-debug-0.log
Try installing the package with the flag --no-bin-links, npm install --no-bin-links playwright.
Note: don't have my android set to English, so the settings could have a different translation.
Hold the Termux app on your phone
Click on App-info
Rights or Permissions
Click on the Files and media and grand the permission.
try again
use like that
npm run d -package=#types/node
"scripts": {
"d":" npm i $package --no-bin-links && npm run postinstall",
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "find node_modules/ -type l -exec rm {} +"
}
Had the same issue installing node_modules to a USB drive. Using therocco's answer did the job for me.
INSTALL GLOBAL NPM PACKAGES
npm config set unsafe-perm true
CLEAN CACHE
npm cache clean
BYPASS SYMLINK ISSUES
npm install --no-bin-links

Problem with installing quick.db (Termux)

I tried to install quick.db with npm:
$ npm i quick.db better-sqlite3
And it's giving me an error:
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../prebuild-install/bin.js
npm ERR! dest /storage/emulated/0/bot/node_modules/.bin/prebuild-install
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../prebuild-install/bin.js' -> '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'
npm ERR! [Error: EPERM: operation not permitted, symlink '../prebuild-install/bin.js' -> '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../prebuild-install/bin.js',
npm ERR! dest: '/storage/emulated/0/bot/node_modules/.bin/prebuild-install'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-07-20T09_05_11_700Z-debug-0.log
So I think this is problem with installing a better-sqlite3, beacuse I don't have problems with installing only quick.db:
npm i quick.db

"npm install node-session" on termux app. Then i got this error. How can i install node-session on termux?

npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm WARN deprecated #mapbox/geojsonhint#2.0.1: Please make plans to check GeoJSON in some other way
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../#mapbox/geojsonhint/bin/geojsonhint
npm ERR! dest /storage/emulated/0/Coding/noda/node_modules/.bin/geojsonhint
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/noda/node_modules/.bin/geojsonhint'
npm ERR! [Error: EPERM: operation not permitted, symlink '../#mapbox/geojsonhint/bin/geojsonhint' -> '/storage/emulated/0/Coding/noda/node_modules/.bin/geojsonhint'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../#mapbox/geojsonhint/bin/geojsonhint',
npm ERR! dest: '/storage/emulated/0/Coding/noda/node_modules/.bin/geojsonhint'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-04-25T18_23_32_395Z-debug-0.log
Install it with --no-bin-links.

Getting Error npm ERR! errno 50 while installing Ionic

Hello I tried making Ionic App using node.js
first time I successfully made the simple Hello World Project in ionic
Next day because of the some reason i have to re-install the node.js
now when i am trying to make ionic app It's giving me an error
Your environment has been set up for using Node.js 0.10.32 (ia32) and npm.
C:\Users\SABA-PC>npm install -g ionic gulp
npm ERR! Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_modules
\ionic\node_modules\.bin'
npm ERR! { [Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_mod
ules\ionic\node_modules\.bin']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\node_modules\\ionic
\\node_modules\\.bin' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "gulp"
npm ERR! cwd C:\Users\SABA-PC
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\SABA-PC\AppData\Roaming\npm\node_modules\ionic\node_modul
es\.bin
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roaming\npm\node_m
odules\ionic\node_modules\.bin'
npm ERR! error rolling back Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\Roami
ng\npm\node_modules\ionic\node_modules\.bin'
npm ERR! error rolling back { [Error: EPERM, unlink 'C:\Users\SABA-PC\AppData\R
oaming\npm\node_modules\ionic\node_modules\.bin']
npm ERR! error rolling back errno: 50,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path: 'C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\
node_modules\\ionic\\node_modules\\.bin' }
npm ERR! not ok code 0
In my Environment Variable Path=C:\Users\SABA-PC\AppData\Roaming\npm
i tried location the folder C:\\Users\\SABA-PC\\AppData\\Roaming\\npm\\
node_modules\\ionic\\node_modules\\.bin
which is saying Access is denied eventhough i am running node.js as a administrator
Please help
There might be a problem with your node or npm as you've said you had to reinstall it. Try to change the location of your npm cache by running this command:
npm config set cache C:\Users\SABA-PC\AppData\Roaming\nodejs\npm-cache --global
And read more about npm updates here:
https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

error npm install -g ionic

npm install -g ionic
npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/ionic'
npm ERR! { [Error: EACCES, mkdir '/usr/lib/node_modules/ionic']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/lib/node_modules/ionic',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/lib/node_modules/ionic',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-72-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/livemen
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /usr/lib/node_modules/ionic
npm ERR! fstream_path /usr/lib/node_modules/ionic
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/lib/node_modules/ionic'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-72-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/livemen
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/livemen/npm-debug.log
npm ERR! not ok code 0
Like the error says, try running this again as administrator, i.e. try sudo npm install -g ionic.
You run npm with user permissions (which is correct way) but it cannot create subdirectories inside /usr/lib. A recommended way to fix it is to change the ownership
sudo chown -R $USER /usr/lib
provided you are the only user who should install global node packages on your machine.
Resist the temptation to sudo npm :-)
See here for more details.

Categories

Resources