Uncaught Error Error: EPERM: operation not permitted, rename ~~~ - react-native

Q. I got this problem in my expo project. How can i solve this problem?
Uncaught Error Error: EPERM: operation not permitted, rename 'C:\Users\예원.expo\state.json.1218894428' -> 'C:\Users\예원.expo\state.json'
npm ERR! code 1
npm ERR! path C:\KeywordAlarm
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c expo start
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\예원\AppData\Local\npm-cache_logs\2021-02-09T13_39_43_115Z-debug.log

in my case, npm cache verify helped to solve this problem (win10, vs code)

Stop the project and try running npm cache clean. If that doesn't work, try npm cache clean --force.

Navigate to the mentioned directory (C:\Users[username].expo).
find state.json. duplicate it (state Copy.json) and remove the previous version. make sure the file name is state.json and voila.
try running npx expo login again.

Related

Eror occurs when install nuxt and create app

Cannot instal nuxt and create app.
I used https://nuxtjs.org/docs/get-started/installation and https://github.com/nuxt/create-nuxt-app for creating app but this error occurs:
"create-nuxt-app"
is not internal or external
command executed by a program or batch file.
npm ERR! path C:\Users\Acer\Desktop\nuxt
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-nuxt-app "hacker-news"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Acer\AppData\Local\npm-cache\_logs\2022-12-03T06_03_59_129Z-debug-0.log```
Please help!
PS: node js and npm are installed
Figured it out.
npm cache clean --force (sudo if needed)
npm install

error when i try to install vue.js in my computer (windows 10)

Below the error message:
1 package is looking for funding
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vinic\AppData\Local\npm-cache_logs\2022-11-11T20_01_58_589Z-debug-0.log
Does anyone know what can it be?
I tried to run the command prompt and powershell on windows in addition to finishing in Vs Code and I was not successful

Whenever I run npm install in my terminal, I get "cb() never called"

npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JOVANNE DELA ROSA\AppData\Roaming\npm-cache\_logs\2021-07-16T20_58_48_839Z-debug.log
When we install a node packages from package.json file and package-lock.json file is corrupted due to some reasons like node.js version is updated to the latest, we will see an error like this in our terminal.
To fix this error, first delete the package-lock.json file and run the following command.
npm cache clean --force
Now, try to install your packages using the npm install command.

Unable to update or execute the 'expo' command in command prompt

For the first time i tried to install the expo-cli on my project directory it worked. I can use expo init to make my first react native app in my command prompt, and run the app with expo start. But now when i have some new project to make with the 'expo' command like expo init or expo start or something else, it didn't work anymore. When i tried to type and enter the expo command, its always be
'expo' is not recognized as an internal or external command, operable program or batch file.
And now when i tried to update the expo-cli with npm install -g expo-cli a warning of error appeared.
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\ACER\AppData\Roaming\npm\node_modules\expo-cli
npm ERR! dest C:\Users\ACER\AppData\Roaming\npm\node_modules\.expo-cli-foqoNR8w
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\ACER\AppData\Roaming\npm\node_modules\expo-cli' -> 'C:\Users\ACER\AppData\Roaming\npm\node_modules\.expo-cli-foqoNR8w'
npm ERR! [Error: EPERM: operation not permitted, rename 'C:\Users\ACER\AppData\Roaming\npm\node_modules\expo-cli' -> 'C:\Users\ACER\AppData\Roaming\npm\node_modules\.expo-cli-foqoNR8w'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\ACER\\AppData\\Roaming\\npm\\node_modules\\expo-cli',
npm ERR! dest: 'C:\\Users\\ACER\\AppData\\Roaming\\npm\\node_modules\\.expo-cli-foqoNR8w'
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\ACER\AppData\Local\npm-cache\_logs\2021-01-10T17_18_03_575Z-debug.log
This preventing me from doing the installation of react navigation and make a new project by using 'expo' command. And i've been search this problem on and tried to solve it but it didn't work on any various ways that i've tried. I've tried to reinstall the expo-cli but it didn't work, i've tried to use yarn as well but still it didn't work. I've been re-added the path for the npm and even tried to reinstall nodejs and use any various code for updating and installing the 'expo-cli' but it didn't work as expected.
Any suggest on how do i can fix this problem ?
Run your command line as Admin and then do the following:
npm remove -g expo-cli to remove the existing CLI
and then npm i -g expo-cli to reinstall the Expo CLI.
Then you can simply login via expo login (if you were logged in) and take off from where you were!
I delete the expo file on the path :
C:\Users\ACER\AppData\Roaming\npm\node_modules\expo-cli
C:\Users\ACER\AppData\Roaming\npm\node_modules\.expo-cli-foqoNR8w
the file that i deleted : expo-cli & .expo-cli-foqoNR8w
And then try to install the expo-cli again with npm install --global expo-cli then it work. Now i can use my expo start or whatever code with 'expo' in it. And also now i can install react navigation on my project directory. And i'm running the installation by using command prompt run as admin.

Unhandled 'error' event when run npm install

When I run mvnw -Pdev,webpack command, I got this error. I will appreciate if anyone could help me.
--- frontend-maven-plugin:1.6:npm (npm install) # demoapp ---
Running 'npm install' in C:\Users\pc\demoapp
> demoapp#0.0.0 postinstall C:\Users\pc\demoapp
> webdriver-manager update --gecko false
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
events.js:183
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onread (net.js:622:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demoapp#0.0.0 postinstall: `webdriver-manager update --gecko false`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demoapp#0.0.0 postinstall 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:\Users\pc\AppData\Roaming\npm-cache\_logs\2018-10-16T06_55_48_437Z-debug.log
I ran into the same symptoms because of an inconsistent node_modules/ state.
Deleting node_modules/ and running npm install --verbose solved my issue. Even despite the --verbose flags, the installation process may not show progress for four and more minutes. Checking for a changing directory size of node_modules/ regularly calmed me down and let me know the installation kept going on.
When using Windows 10 Powershell, the solution to this for me was to run Powershell as Administrator.
Prior to that, I tried deleting nodes_modules/ as described in https://stackoverflow.com/a/53558340/1207532 but that didn't make any difference for me.