React-router: Error: Operation not permitted, rename...

Created on 19 Apr 2016  路  4Comments  路  Source: ReactTraining/react-router

I鈥檓 having an issue whereby the first attempt to update or install any of the recent versions will end with an error (see below). If I then install again after the error, it works okay. It looks like it's trying to rename a directory after it has been deleted, or that the operation isn't supported on my OS (Windows 10).

I鈥檓 not sure when I first encountered this error. It wasn't occurring in the original 2.0.0 release, I鈥檓 pretty sure of that, but I鈥檝e seen it for the last few releases at least.

Version

2.3.0

Steps to reproduce

Install/update any of the recent versions. Using: npm install --save-dev react-router or npm update --save-dev react-router.

Expected Behavior

I鈥檝e shortened the paths shown below, and replaced them with ... to make the output more concise.

E:\...\MyProject>npm install --save-dev react-router
[email protected] E:\...\MyProject
`-- [email protected]

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Actual Behavior

E:\...\MyProject>npm install --save-dev react-router
npm WARN install:[email protected] EPERM: operation not permitted, rename 'E:\...\MyProject\node_modules\react-router' -> 'E:\...\MyProject\node_modules\.react-router.DELETE'
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Most helpful comment

I just ran into this problem. Solved by stopping running the localhost.

All 4 comments

This seems like an issue with your local package directory. Try wiping node_modules and reinstalling.

I just ran into this problem. Solved by stopping running the localhost.

so what's is the solution about this problem?

@amtili Stop any local processes running the server, then run npm install or npm update (with react-router --save-dev as necessary).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wzup picture wzup  路  3Comments

andrewpillar picture andrewpillar  路  3Comments

sarbbottam picture sarbbottam  路  3Comments

alexyaseen picture alexyaseen  路  3Comments

misterwilliam picture misterwilliam  路  3Comments