Laravel-mix: Error: EPERM: operation not permitted, read

Created on 11 Aug 2020  路  5Comments  路  Source: JeffreyWay/laravel-mix

after 'npm run dev' i have this error:

i tested on fresh laravel and nothing changes,thank's for your help.

ERROR in ./node_modules/axios/lib/helpers/cookies.js
Module build failed: Error: EPERM: operation not permitted, read
@ ./node_modules/axios/lib/adapters/xhr.js 88:20-51
@ ./node_modules/axios/lib/defaults.js
@ ./node_modules/axios/lib/axios.js
@ ./node_modules/axios/index.js
@ ./resources/js/bootstrap.js
@ ./resources/js/app.js
@ multi ./resources/js/app.js ./resources/sass/app.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersPudgeAppDataRoamingnpm-cache_logs2020-08-11T20_43_32_248Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: npm run development
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersPudgeAppDataRoamingnpm-cache_logs2020-08-11T20_43_32_348Z-debug.log
image_2020-08-12_01-17-14

All 5 comments

Looks like you don't have the proper permissions set in the node_modules directory.

Looks like you don't have the proper permissions set in the node_modules directory.

PS C:UsersPudgeDesktopblog> npm config ls -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.14.6 node/v12.18.3 win32 x64"

; builtin config undefined
prefix = "C:\Users\Pudge\AppData\Roaming\npm"

; default values
access = null
allow-same-version = false
also = null
always-auth = false
audit = true
audit-level = "low"
auth-type = "legacy"
before = null
bin-links = true
browser = null
ca = null
cache = "C:\Users\Pudge\AppData\Roaming\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
format-package-lock = true
fund = true
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "C:\Users\Pudge\AppData\Roaming\npm\etc\npmrc"
globalignorefile = "C:\Users\Pudge\AppData\Roaming\npm\etc\npmignore"
group = 0
ham-it-up = false
heading = "npm"
https-proxy = null
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\Users\Pudge\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "12.18.3"
noproxy = null
offline = false
onload-script = null
only = null
optional = true
otp = null
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
; prefix = "C:\Program Files\nodejs" (overridden)
preid = ""
production = false
progress = true
proxy = null
read-only = false
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
save-prod = false
scope = ""
script-shell = null
scripts-prepend-node-path = "warn-only"
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900
send-metrics = false
shell = "C:\WINDOWS\system32\cmd.exe"
shrinkwrap = true
sign-git-commit = false
sign-git-tag = false
sso-poll-frequency = 500
sso-type = "oauth"
strict-ssl = true
tag = "latest"
tag-version-prefix = "v"
timing = false
tmp = "C:\Users\Pudge\AppData\Local\Temp"
umask = 0
unicode = false
unsafe-perm = true
update-notifier = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch} {ci}" (overridden)
userconfig = "C:\Users\Pudge\.npmrc"
version = false
versions = false
viewer = "browser"

this is my config list.

I tried everything
npm cache clean --force
rm node_modules
npm install
turn of windows defender
But it did not work
Finally I reset my Windows and it was fixed.

@h6s8n how did u fix this error. I am experiencing the same error and i haven't been able to solve it since last two days. Nor i could find a solution online which would do the job.

i meant any other solution except resetting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pixieaka picture pixieaka  路  3Comments

sdebacker picture sdebacker  路  3Comments

jpmurray picture jpmurray  路  3Comments

kpilard picture kpilard  路  3Comments

dtheb picture dtheb  路  3Comments