0

I brought a new macbook pro m1 and i copied a react project that i am currently working in a windows laptop ,but it was not running and showing a permission denied message and the node modules folder is showing in a gray color in vs code.This project was perfectly running in my windows at the same time.

bimalboby@Bimals-MacBook-Pro netflix % npm start

> netflix@0.1.0 start /Users/bimalboby/Desktop/Projects/Netflix-clone/netflix
> react-scripts start

sh: /Users/bimalboby/Desktop/Projects/Netflix-clone/netflix/node_modules/.bin/react-scripts: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! netflix@0.1.0 start: `react-scripts start`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the netflix@0.1.0 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!     /Users/bimalboby/.npm/_logs/2021-06-14T04_42_21_515Z-debug.log
bimalboby@Bimals-MacBook-Pro netflix % 
  • Check your file permissions – Kwright02 Jun 14 '21 at 04:48
  • Also if you copied it across *with* the node_modules folder, you will need to delete that folder and run `npm install` to get the node packages compatible with your macbook pro M1. – Will Walsh Jun 14 '21 at 04:49
  • how to check it, can please guide me i am a new mac user – ʙɪᴍᴀʟ ʙᴏʙy Jun 14 '21 at 04:51
  • Your Desktop folder is one of several locations that's considered "personal information", and has [special access protection in recent versions of macOS](https://apple.stackexchange.com/questions/332673/what-and-how-does-macos-mojave-implement-to-restrict-applications-access-to-pers). I don't know if this is what's causing the problem, but I'd recommend moving the files somewhere else. – Gordon Davisson Jun 14 '21 at 06:56
  • See https://stackoverflow.com/questions/55022219/getting-npm-err-code-elifecycle-npm-err-errno-126-while-running-npm-install which has a couple of pointers. – Beel Jun 14 '21 at 18:50
  • Check file permissions in finder by clicking on the file (use two fingers on the trackpad) and select Get info. Permissions will be at the bottom of the dialog. node_modules is probably grayed out because it's in .gitignore – maxwondercorn Jun 15 '21 at 00:46

0 Answers0