npm start isn't working, react-native app - react-native

im trying to build react-native app.
running the commands on gitBash, windows10.
when im trying to run 'npm start' im getting this error:
Fixed , just installed again expo-cli in the rn-starter folder, thanks for the answers :)
$ npm start
> # start C:\Users\Liran\food
> expo start
'expo-cli' is not recognized as an internal or external command,
operable program or batch file.
This command requires Expo CLI.
Do you want to install it globally [Y/n]? Y
Installing the package 'expo-cli'...
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path C:\Users\Liran\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\.xdl.DELETE\binaries\windows\adb\AdbWinApi.dll
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Liran\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\.xdl.DELETE\binaries\windows\adb\AdbWinApi.dll'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'C:\Users\Liran\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\.xdl.DELETE\binaries\windows\adb\AdbWinApi.dll'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'C:\Users\Liran\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\.xdl.DELETE\binaries\windows\adb\AdbWinApi.dll'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\Liran\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\#expo\\.xdl.DELETE\\binaries\\windows\\adb\\AdbWinApi.dll'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\Liran\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\#expo\\.xdl.DELETE\\binaries\\windows\\adb\\AdbWinApi.dll',
npm ERR! parent: 'expo-cli'
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\Liran\AppData\Roaming\npm-cache\_logs\2020-10-19T09_36_58_255Z-debug.log
Installing Expo CLI failed. You can install it manually with:
npm install --global expo-cli
npm ERR! code ELIFECYCLE
npm ERR! errno 4294963248
npm ERR! # start: `expo start`
npm ERR! Exit status 4294963248
npm ERR!
npm ERR! Failed at the # start 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\Liran\AppData\Roaming\npm-cache\_logs\2020-10-19T09_36_58_348Z-debug.log
help please someone :)

Open windows terminal as Administrator and run command:
install --global expo-cli
then from the root of your project you can either run expo start or npm start both will do.

You need to install Expo CLI package.
see: https://docs.expo.io/workflow/expo-cli/
install:
npm install -g expo-cli
If you still getting same error do these two steps;
Be sure about working on terminal as administrator
If you're using an antivirus program, STOP it while trying to execute above command.

Related

Npm error occuring when trying to run npm install -g npm

Receiving the foillowing error, when I try to search C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules#npmcli via run app it tell mes that it cannot find the file
error when using run command to find path
Picture of error code in cmd
C:\GreaterWMS\templates>npm install -g npm
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules#npmcli
npm ERR! dest C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules#npmcli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules#npmcli' -> 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules#npmcli'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules#npmcli' -> 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules#npmcli'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules.node-gyp.DELETE\node_modules#npmcli' -> 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules#npmcli'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\.node-gyp.DELETE\node_modules\#npmcli',
npm ERR! dest: 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\#npmcli'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\.node-gyp.DELETE\node_modules\#npmcli',
npm ERR! dest: 'C:\Users\harka\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\node_modules\#npmcli',
npm ERR! parent: 'npm'
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\harka\AppData\Roaming\npm-cache_logs\2022-11-15T14_28_23_790Z-debug.log
I have no idea how to fix this error, I have tried creating a temporary cache I have wiped my entire computer and reset and restarted the entire process from scratch but I keep receiving this same error.
I have turned off my firewall
2.I have turned off all anti virus software
3.I have tried deleting the Roaming data npm folder and tried to reinstall npm, but everything that I try to do nothing will fix this error.
thought maybe because my user for my microsoft is 2 names (First and Last, I then turn my pc into a local machine so it the user would only be "harka"
And have you installed npm previously, can you run for example npm -v ? if not, that means u don't have npm installed at all and you trying to use it to install npm (if I am not mistaken)
Then assuming you are using windows, the best way to install npm to windows is to download node.js from their official website, which installs npm as well.

I couldn't install import sass into my project

when I run the command
npm install --save-dev sass
from bootstrap-v5 folder I'm getting this error shown below
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../sass/sass.js
npm ERR! dest/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../sass/sass.js' -> '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'
npm ERR! [Error: EPERM: operation not permitted, symlink '../sass/sass.js' -> '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../sass/sass.js',
npm ERR! dest: '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
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! /data/data/com.termux/files/home/.npm/_logs/2021-09-29T17_41_24_947Z-debug.log
But I was able to install sass globally with the command npm i -g sass.
I'm just trying this out for the first time. And, is there any way to import sass to my project as I have already installed sass globally?
Try npm install node-sass instead of npm install sass

Why do I get these errors when I type npm install in the terminal?

Whenever I install anything with npm, I get the following error list:
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Users\Firstname~1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'] {
npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Users\\Firstname~1'
npm ERR! },
npm ERR! isOperational: true,
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Users\\Firstname~1'
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.
How can I resolve this? How can I run npm install by administrator?
Looks like an npm misconfiguration issue.
Ideally, you can configure it to use only directories that your user has access, so you won't need admin privileges just to install global packages.
First, check what's the npm prefix using a command like
npm config ls -l
I bet it will show something like
prefix = "C:\\Users\\"
Try to create at C:\Users{username}\ where {username} is your own, a .npmrc file with an entry like
prefix = "C:\\Users\\{username}\\some_dir_you_have_access"
Then use -g like npm install -g package, this way npm will try to install global packages in the path specified by "prefix" you've defined.
npm folders are documented here https://docs.npmjs.com/cli/v7/configuring-npm/folders

npg sudden error installing things

When I try to install npm install _____ I get this weird error I've never seen before. I opened powershell as admin and tried there, but got the same error. Also tried installing in safe mode, turning off many programs, npm cache clean --force, deleting and re-installing npm, cmd as admin, and many other things...
It was working fine last night, but when I woke up it stopped working....
PS Z:\myapp> npm install #google/maps
npm ERR! path Z:\myapp\node_modules\fsevents\node_modules\abbrev\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'Z:\myapp\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'Z:\myapp\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'Z:\\myapp\\node_modules\\fsevents\\node_modules\\abbrev\\package.json\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'Z:\\myapp\\node_modules\\fsevents\\node_modules\\abbrev\\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\AppData\Roaming\npm-cache\_logs\2017-09-12T13_11_39_774Z-debug.log
It freezes at postinstall: info lifecycle #types/googlemaps#3.26.20~postinstall: #types/googlemaps#3.26.20 then eventually just crashes totally.
Try using --no-optional while installing any package.
npm install nodemon --no-optional

npm intstall: binding.node is missing

I tried to install npm on my local machine (Mac OS) but when I run npm start, it keeps giving me this error with node_sass. Even when I run
sudo npm install node_sass
it doesn't fix the problem.
Error: You probably need to execute `npm install` to install brunch plugins.
Error: `/Users/AnhLe/bloc/anh-jams/node_modules/sass-brunch/node_modules/node-sass/bin/darwin-x64-v8-3.28/binding.node` is missing. Try reinstalling `node-sass`?
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.0
npm ERR! npm v2.7.3
npm ERR! code ELIFECYCLE
npm ERR! bloc-rdio-skeleton#0.0.1 start: `brunch watch --server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bloc-rdio-skeleton#0.0.1 start script 'brunch watch --server'.
npm ERR! This is most likely a problem with the bloc-rdio-skeleton package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! brunch watch --server
npm ERR! You can get their info via:
npm ERR! npm owner ls bloc-rdio-skeleton
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/AnhLe/bloc/anh-jams/npm-debug.log
Looked around and these people are experiencing a similar error due to binding.node missing from SASS.
https://github.com/dlmanning/gulp-sass/issues/185