I am trying to install css less but getting this error:
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\nodejs\node_modules\.staging
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\.staging'
npm ERR! }
Tried to do is also in Git Bash as administrator but gets this:
$ npm install less -g
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\me_adm\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\igorska_adm\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Did anyone face this kind of issue?
Tried also:
npm cache clean
deleting package-lock
An easier way to do this would be to compile it with PHP or link the JS library through the HTML page. This way you can avoid NPM and it will be faster.
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="//cdn.jsdelivr.net/npm/less#3.13" ></script>
Link your styles in the style tag and leave the script tag to have the compiler imported.
Related
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\CypressAutomation\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Users\CypressAutomation\package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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! C:\Users\user\AppData\Local\npm-cache_logs\2022-11-29T05_56_09_860Z-debug-0.log
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\CypressAutomation\package.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\Users\CypressAutomation\package.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Users\CypressAutomation\package.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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! C:\Users\user\AppData\Local\npm-cache_logs\2022-11-29T05_56_09_860Z-debug-0.log
When I try to use: sail npm install
I get this error
root#WINDOWS-E22VCBT:~/touchdownclub# sail npm install
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /var/www/html/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/var/www/html/node_modules'
npm ERR! [Error: EACCES: permission denied, mkdir '/var/www/html/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/var/www/html/node_modules'
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! /home/sail/.npm/_logs/2022-08-30T15_18_36_633Z-debug-0.log
root#WINDOWS-E22VCBT:~/touchdownclub#
The root of my working directory is
\\wsl$\Ubuntu\root\touchdownclub
I don't see that there is a path /var/www/html
I tried sail npm install --prefix /
in the touchdownclub directory
Is my install completely wrong or is there a way to get node_modules to install
0
i am trying to install npm libraries on windows to work with javascript but it showing this error in cmd...
C:\Users\tusha>npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\tusha/package.json
npm ERR! errno -4058 tampa junk cars
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\tusha\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
When running npm install -g appium, installation fails with the following log:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/Cellar/node/15.1.0/lib/node_modules/appium/build/lib/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/Cellar/node/15.1.0/lib/node_modules/appium/build/lib/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lgn/.npm/_logs/2020-11-09T08_33_15_328Z-debug.log
I'm unable to npm install -D webpack. I get the following error message:
npm ERR! path C:\Users\Yevgeny Kozlov\Desktop\cpay-ext\node_modules\fsevents\nod
e_modules\abbrev\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Yevgeny Kozlov\
Desktop\cpay-ext\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\Yevgeny Kozl
ov\Desktop\cpay-ext\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\Ye
vgeny Kozlov\\Desktop\\cpay-ext\\node_modules\\fsevents\\node_modules\\abbrev\\p
ackage.json\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\Yevgeny Kozlov\\Desktop\\cpay-ext\\node_modules\\fs
events\\node_modules\\abbrev\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Yevgeny Kozlov\AppData\Roaming\npm-cache\_logs\2017-12-31T
21_12_18_374Z-debug.log
It used to work normally. I would appreciate your help on what's going on with this machine.
I've removed
C:\Users\Yevgeny Kozlov\AppData\Roaming\npm-cache\
C:\Users\Yevgeny Kozlov\AppData\Roaming\npm\
folders and it has helped.