Phoenix: Error: EPERM: operation not permitted, unlink

Created on 28 Aug 2017  Â·  66Comments  Â·  Source: phoenixframework/phoenix

Expected behavior

No errors while executing npm install in ./assets directory.

Actual behavior

All commands are run as root/Administrator. I run mix phx.new hello, which suggests to run cd hello and cd assets && npm install && node node_modules/brunch/bin/brunch build afterwards.

When I run npm install in ./assets directory, I get the following error:

npm ERR! path c:\prj\hello\assets\node_modules\nan\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'c:\prj\hello\assets\node_modules\nan\package.json'
npm ERR!  { Error: EPERM: operation not permitted, unlink 'c:\prj\hello\assets\node_modules\nan\package.json'
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'c:\\prj\\hello\\assets\\node_modules\\nan\\package.json\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'c:\\prj\\hello\\assets\\node_modules\\nan\\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\foo\AppData\Roaming\npm-cache\_logs\2017-08-28T21_19_41_885Z-debug.log

Is it ok? Does it break my app somehow?

Environment

  • Elixir version (elixir -v):
Erlang/OTP 20 [erts-9.0] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10]
Elixir 1.5.1
  • Phoenix version (mix deps):
* file_system 0.2.0 (Hex package) (mix)
  locked at 0.2.0 (file_system) 1b899a87
  ok
* connection 1.0.4 (Hex package) (mix)
  locked at 1.0.4 (connection) a1cae722
  ok
* gettext 0.13.1 (Hex package) (mix)
  locked at 0.13.1 (gettext) 5e0daf4e
  ok
* ranch 1.3.2 (Hex package) (rebar3)
  locked at 1.3.2 (ranch) e4965a14
  ok
* poolboy 1.5.1 (Hex package) (rebar3)
  locked at 1.5.1 (poolboy) 6b461639
  ok
* decimal 1.4.0 (Hex package) (mix)
  locked at 1.4.0 (decimal) fac965ce
  ok
* poison 3.1.0 (Hex package) (mix)
  locked at 3.1.0 (poison) d9eb6366
  ok
* db_connection 1.1.2 (Hex package) (mix)
  locked at 1.1.2 (db_connection) 2865c2a4
  ok
* phoenix_pubsub 1.0.2 (Hex package) (mix)
  locked at 1.0.2 (phoenix_pubsub) bfa7fd52
  ok
* cowlib 1.0.2 (Hex package) (rebar3)
  locked at 1.0.2 (cowlib) 9d769a1d
  ok
* cowboy 1.1.2 (Hex package) (rebar3)
  locked at 1.1.2 (cowboy) 61ac29ea
  ok
* mime 1.1.0 (Hex package) (mix)
  locked at 1.1.0 (mime) 01c1d6f4
  ok
* plug 1.4.3 (Hex package) (mix)
  locked at 1.4.3 (plug) 236d77ce
  ok
* phoenix_html 2.10.4 (Hex package) (mix)
  locked at 2.10.4 (phoenix_html) d4f99c32
  ok
* phoenix 1.3.0 (Hex package) (mix)
  locked at 1.3.0 (phoenix) 1c01124c
  ok
* phoenix_live_reload 1.1.1 (Hex package) (mix)
  locked at 1.1.1 (phoenix_live_reload) 8c9f0fb9
  ok
* postgrex 0.13.3 (Hex package) (mix)
  locked at 0.13.3 (postgrex) c277cfb2
  ok
* ecto 2.2.1 (Hex package) (mix)
  locked at 2.2.1 (ecto) ccc6fd30
  ok
* phoenix_ecto 3.2.3 (Hex package) (mix)
  locked at 3.2.3 (phoenix_ecto) 450c7498
  ok
  • NodeJS version (node -v):
v8.4.0
  • NPM version (npm -v):
5.4.0
  • Operating system:
Microsoft Windows [Version 10.0.15063]

Most helpful comment

That error generally means that a file is being accessed by two different things at 'around' the same time. And 90% of those times it is because of an anti-virus or similar.

All 66 comments

Hey,

that is not directly Phoenix related. Something with your nodejs/npm setup is broken. Your app will continue to work, you are just not able to compile your frontend assets right now.

@PhillippOhlandt Well, is it a common problem for Phoenix frontend assets? I'm pretty sure everything is fine with NodeJS/npm, because other products, that use them - work just fine.

It seems to be a common problem on Windows. When you google the error, you see a lot of issues on various NodeJS libs and frameworks. I am sure I had this problem too some day, but I can't remember how I fixed it. Maybe you can browse through the issues and look for a solution until someone else replies with one here.

https://www.google.com/search?source=hp&q=npm+Error%3A+EPERM%3A+operation+not+permitted%2C+unlink&oq=npm+Error%3A+EPERM%3A+operation+not+permitted%2C+unlink&gs_l=psy-ab.3..0i22i30k1l2.917.917.0.1159.1.1.0.0.0.0.90.90.1.1.0....0...1.1.64.psy-ab..0.1.90.8mi0F3pMV1E

@PhillippOhlandt

Looks like the problem is with brunch npm package.
When I run:

npm install -g brunch

I get the same error.

That error generally means that a file is being accessed by two different things at 'around' the same time. And 90% of those times it is because of an anti-virus or similar.

@OvermindDL1 No antivirus at all. Microsoft protection apps are also turned off.

It looks like a filesystem permission issue. look here the same error

https://blogs.msdn.microsoft.com/matt-harrington/2012/02/23/how-to-fix-node-js-npm-permission-problems/

uninstall all npm modules and re-install with npm install --no-bin-links. I had same problem on windows.
read this for more info

uninstall all npm modules and re-install with npm install --no-bin-links. I had same problem on windows.
read this for more info

I'm curious, as I'm not a heavy windows user (only touch that mess at work), why is it working for me?

I stumble on the knowledge of --no-bin-links doing laravel projects on windows and always have problem with npm commands. So my rule of working on windows is "run npm with that switch" and on any other OS without it. If you have been using npm without the switch, then most likely you are yet to install a module that will fail doing so.

I stumble on the knowledge of --no-bin-links doing laravel projects on windows and always have problem with npm commands. So my rule of working on windows is "run npm with that switch" and on any other OS without it. If you have been using npm without the switch, then most likely you are yet to install a module that will fail doing so.

Do you have such a module that I can test with then? I use quite a load from brunch to bucklescript to many others and apparently over 700 (holy...) in between based on the dependency graph... >.>

@bxqgit have you made any progress on this? Did you try running npm install --no-bin-links within the assets directory?

@chrismccord I just dropped the npm cache and everything works fine now. It's definitely the issue of npm, not Phoenix.

rd /s /q C:\Users\foo\AppData\Roaming\npm-cache
rd /s /q C:\Users\foo\AppData\Roaming\npm

Great to hear you're up and running! Thanks for following up

If you have private registries you forgot to configure, don't forget about npm adduser or npm login. Alternatively if that is the case, look over the ~/.npmrc file to make sure this makes sense.

I was tracing this down thinking this was a perms issue or windows issue until I found this in another git issue.

Found this thread expiriencing similar issue with
npm publish <tarball>

Solved it by logging into npmjs:
npm login

Would be great to have more descriptive message for failed authentication, if this is the case.

We shoud off the Antivirus... Thank you
OvermindDL1

We shoud off the Antivirus... Thank you

No problem. For note you shouldn't need to completely shut off the AV (well, for some of them, others still read everything, even ignored areas) if you just add the whole project path to it's ignored locations. :-)

Facing problem::while installaion of ionic... It shows python not
installed.....could you help me to solve this

On 16 Jan 2018 9:10 pm, "OvermindDL1" notifications@github.com wrote:

We shoud off the Antivirus... Thank you

No problem. For note you shouldn't need to completely shut off the AV
(well, for some of them, others still read everything, even ignored areas)
if you just add the whole project path to it's ignored locations. :-)

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-358002533,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-94WkRmKRWl5ptcKlDHTj0xwZw1ap1ks5tLMLhgaJpZM4PFFru
.

Facing problem::while installaion of ionic... It shows python not
installed.....could you help me to solve this

Elixir, nor Phoenix, use Python anywhere, so I'm unsure how it would relate to the phoenix repository. :-)
No clue what ionic is, perhaps check its docs?

Thank you

On 16 Jan 2018 9:33 pm, "OvermindDL1" notifications@github.com wrote:

Facing problem::while installaion of ionic... It shows python not
installed.....could you help me to solve this

Elixir, nor Phoenix, use Python anywhere, so I'm unsure how it would relate
to the phoenix repository. :-)
No clue what ionic is, perhaps check its docs?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-358011496,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-94ZR-SLOTAKwR0h3l50jKNX-F1XOBks5tLMhngaJpZM4PFFru
.

If you are on windows you have to start your node application having adminsitration rights while opening your terminal (dos) window. Right click the terminal icon and select "run as an adminstrator"

Yes brother. Thank you

On 13 Feb 2018 6:59 pm, "kchrs" notifications@github.com wrote:

If you are on windows you have to start your node application having
adminsitration rights while opening your terminal (dos) window. Right click
the terminal icon and select "run as an adminstrator"

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-365266456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-94aGbu8HftdipCtQbdlszRhGhjjOjks5tUY4cgaJpZM4PFFru
.

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

Thank you

On 26 Feb 2018 10:13 pm, "Logan Simonsen" notifications@github.com wrote:

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-368565759,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-94b7fv3uCEM0PrtpdiN03u3NVzoL4ks5tYt8lgaJpZM4PFFru
.

Thank you @LoganSimonsen . Your solution works for me

I had the same issue with create-react-app and chokidar. I had node running with npm start in a different console, so after closing that the error went away. For me it was the same issue as @LoganSimonsen mentions.

Note: I'm used to Linux where this would not have been an issue, that's why I didn't catch it at first and it took me an embarrassing amount of time to find the problem.

I was facing the same issue. I moved my project in another folder and then tried running the same command. It worked.
It indicates it is something in relation with permission.

@veton
Thanks..You solved my problem!

It's ok brother. Do well

On Sun 22 Jul, 2018, 1:02 PM vidurajith-darshana, notifications@github.com
wrote:

@veton https://github.com/veton
Thanks..You solved my problem!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-406847198,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK-94e8drCELUcHUaulajZvpdjE4ngeWks5uJCp1gaJpZM4PFFru
.

Thank you @LoganSimonsen this working for me too

I tried using Task Manager to kill background node processes. For me I finally had to reboot to ensure that all background processes were killed.

KILL THEM ALL @schellack

I tried using Task Manager to kill background node processes. For me I finally had to reboot to ensure that all background processes were killed.

I too just ran into this for the first time trying to update my expo-cli npm install -g expo-cli. I killed all the node processes in task manager to no avail (neither did stopping antivirus). Restarting windows did work.

command ran: expo init new_project_name
expected: successful creation of project
instead got the error below.

ERROR:

npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]'
npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules\.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules\.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\Users\Godlove\Desktop\ReactNative\thirdReactApp\node_modules\.staging\react-native-4cfe71f8\RNTester\RNTesterIntegrationTests\ReferenceImages\RNTester-js-RNTesterApp.ios\[email protected]' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Godlove\AppData\Roaming\npm-cache_logs\2019-01-13T11_25_48_952Z-debug.log
[03:25:49] Process exited with non-zero code: 4294963248
[03:25:49] Set EXPO_DEBUG=true in your env to view the stack trace.

have tried all the solutions above but none works for me, running windows 10. Please help.
Thanks.

@Abilandou I don't think this is related to Phoenix, you should probably post it in here https://github.com/expo/expo

Ok thanks

Thanks @dalhorinek for the link, problem solved

uninstall all npm modules and re-install with npm install --no-bin-links. I had same problem on windows.
read this for more info

Equally you can use npm ci --no-bin-link where you'd use npm ci otherwise. This worked in my case on Windows.

The solution above does not work for me. i have a sailsjs project and i tried to upload an image in to the assets/img folder but i get this Error: EPERM: operation not permitted, unlink './assets/img/'
error. I do not know what to do about this error.

@bbmattieu9 Might be best to ask this either on the elixir forums or on a node-specific area, but at the very least what is your OS? As long as it's not windows that error is simple to fix, if it is windows well thats more of node assuming unix'y style system and can have a huge variety of different causes, but shouldn't be a phoenix issue in either case.

To me was simple: I tried to run npm install while npm run watch was still running.

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

If you use an IDE, kill running instances to.

Found this thread expiriencing similar issue with
npm publish <tarball>

Solved it by logging into npmjs:
npm login

Would be great to have more descriptive message for failed authentication, if this is the case.

@veton i have publish my pacakge and sometimes when install it for updates it causes this problem how can it be problem with publish ?
and if i use --no-bin-links it's works

`Creating a new React app in C:\Users\CM\Downloads\react\github-profile.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

npm ERR! path C:\Users\CM\AppData\Roaming\npm-cache_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806'
npm ERR! { [Error: EPERM: operation not permitted, lstat 'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, lstat 'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path:
npm ERR! 'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, lstat \'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path:
npm ERR! 'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806',
npm ERR! parent: 'postcss-image-set-function' }
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 thenpm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CM\AppData\Roaming\npm-cache_logs\2019-03-22T10_27_19_722Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting github-profile/ from C:\Users\CM\Downloads\reactDone.``

`

i was facing similar error but i tried to run create-react-app command many times and finally it was created , this was the problem with my internet connection. check your inernet connection

Thanks @dalhorinek for the link, problem solved

Please can you tell me how you solved this. I am having same issue. It will be a great help.

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

Thanks a ton @LoganSimonsen . The idea worked for me.

That's great

On Thu 18 Apr, 2019, 11:27 AM Thulasi, notifications@github.com wrote:

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even
after you think you've closed it in the console and it is accessing all
your node files.

Thanks a ton @LoganSimonsen https://github.com/LoganSimonsen . The idea
worked for me.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phoenixframework/phoenix/issues/2464#issuecomment-484366508,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACX33YICBHLX2DOTPYVWMQ3PRAEU7ANCNFSM4DYULLXA
.

It could be simply due to the reason you had opened node_modules in file explorer.

That error generally means that a file is being accessed by two different things at 'around' the same time. And 90% of those times it is because of an anti-virus or similar.

Yep! It was because I had Webstorm open

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

THANK YOU

@LoganSimonsen Oh Thanks Very much, This is very helpful to me.

its look like windows issue and wait for 1 to 2 minutes and try again then window will release the lock on the file/folder. To me it happens time to time.

Visual studio code's (VS code) integrated terminal created problems for me. For some reason the editor hijacks the files, locking them and so this permission error shows.

If I do it through a standalone terminal, it just works.

Could be windows only problem though, I never had problems with it on linux, also using vscode.

heads up to @jarvar

Visual studio code's (VS code) integrated terminal created problems for me. For some reason the editor hijacks the files, locking them and so this permission error shows.

If I do it through a standalone terminal, it just works.

Could be windows only problem though, I never had problems with it on linux, also using vscode.

heads up to @jarvar

I have a similar experience. Been getting the same error message when bootstrapping lerna from GitBash integrated in WebStorm. Then tried standalone Windows Command and it worked like a charm.

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.
basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

Thanks a ton @LoganSimonsen . The idea worked for me.

Thank you! I followed above steps to resolve the issue.

Can't seem to solve this tho. I have restarted my PC several times and still no luck. I also changed the folder permissions.

most likely a running node.js application is using it. Make sure to close all of the node.js application.[solved]

In my case something got messed up with node_modules and package-lock.json, removing them worked for me.
To remove node_modules through command line, navigate to your project folder and write rm -R node_modules

I have tried EVERYTHING in this page and nothing has worked for me!
When I run the command yarn upgrade @[packagename] it fails immediately with EPERM: operation not permitted. What should I do?

Simply closing vscode fixed this for me. Something else might have a lock on some of the node packages. It is the cause of this issue. Example, you might be running the react development server and it creates a lock on the create-react-app files. This can cause the issue.

This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.

basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

Thank you! it works

Just turn off the app, install a module and run the app again. Worked for me!

@chrismccord I just dropped the npm cache and everything works fine now. It's definitely the issue of npm, not Phoenix.

rd /s /q C:\Users\foo\AppData\Roaming\npm-cache
rd /s /q C:\Users\foo\AppData\Roaming\npm

Worked for me.

Plz help I got the npm err! Code EPERM on my android device I am using termux like a cmd promt

That error generally means that a file is being accessed by two different things at 'around' the same time. And 90% of those times it is because of an anti-virus or similar.

Yeah I was facing the same error and this works fine! for my case it was because I'm actually running the app (metro) and trying to update packages by running yarn

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tcoopman picture tcoopman  Â·  3Comments

mcampa picture mcampa  Â·  3Comments

tjsousa picture tjsousa  Â·  4Comments

adamaiken89 picture adamaiken89  Â·  3Comments

mitchellhenke picture mitchellhenke  Â·  3Comments