0
votes

enter image description hereWhen I install redux-thunk it shows an error and you can see attached image for more info -

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\siddharth.vyas\Desktop\react-native_Proj\AwesomeProject\node_modules.staging\redux-thunk-069b38d0' -> 'C:\Users\siddharth.vyas\Desktop\react-native_Proj\AwesomeProject\node_modules\redux-thunk'

And I have also try to install "redux-thunk" with the administrator but shows the same error.

Pakage.json -

"dependencies": { "axios": "^0.19.0", "react": "16.8.3", "react-native": "0.59.9", "react-native-loading-spinner-overlay": "^1.0.1", "react-redux": "^7.1.0", "redux": "^4.0.1", "redux-axios-middleware": "^4.0.0" }, "devDependencies": { "@babel/core": "7.4.5", "@babel/runtime": "7.4.5", "babel-jest": "24.8.0", "jest": "24.8.0", "metro-react-native-babel-preset": "0.54.1", "react-test-renderer": "16.8.3" },

2
try removing node_modules and do npm install - Medunoye Laxus Gbenga
@MedunoyeLaxusGbenga I did that but nothing change - Siddharth Vyas
delet node_modules, add "redux-thunk": "^2.3.0" to your dependencies, then run npm install -i ... you can show the output - Medunoye Laxus Gbenga
its working @MedunoyeLaxusGbenga Thanks!!!! - Siddharth Vyas
glad to know i helped. Im going to post as an answer, wont mind your upvote - Medunoye Laxus Gbenga

2 Answers

1
votes

try removing node_modules and do npm install. If it doesn't work, delete node_modules, add "redux-thunk": "^2.3.0" to your dependencies, then run npm install -i

0
votes

I have faced similar issues in windows. this looks more of a permission issue.

Try running the cmd window in run as administrator mode. this should mostly give permission to npm to execute the script.

if that does not work, then the option would be to delete the folder redux-thunk from node_modules directory and try reinstalling the redux-thunk module again