1

I am trying to run npm install for the odin project javascript fundamentals part 4 lesson, at first when i forked and cloned the repo and ran the node install like the instructions say I had a permission error but I fixed that by deleting the node_module folder from the npm folder inside the nvm folder. Now I have a new error for which I will include a screenshot. I have spent hours online searching for answers, I have tried making sure access is granted to my terminal from the file, I have also like I said deleted the node_module file, I have also deleted the packagelock.json file like it said online and still no luck. I tried clearing cache also and I tried reinstalling all. I have tried making sure no program is running the folder I am trying to run the command on. None of this works if anyone can help me please let me know

Update

I have no found why it cannot find the files as I had deleted them when i removed the node-modules folder which was the advice I had online for this new error that i am now recieving with the folder put back, I have deleted old error this is the new one, I have tried everything from checking permissions to uninstall and reinstall, and all the things mentioned above

node:internal/bootstrap/switches/does_own_process_state:126
    cachedCwd = rawMethods.cwd();
                           ^

Error: EPERM: operation not permitted, uv_cwd
    at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28)
    at Object.<anonymous> (/Users/mauger/.nvm/versions/node/v16.17.1/lib/node_modules/npm/node_modules/depd/index.js:25:24)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/mauger/.nvm/versions/node/v16.17.1/lib/node_modules/npm/node_modules/agentkeepalive/lib/agent.js:6:19)
    at Module._compile (node:internal/modules/cjs/loader:1126:14) {
  errno: -1,
  code: 'EPERM',
  syscall: 'uv_cwd'
}
mauger@Jordans-Air javascript-exercises % 

1 Answers1

0

I had the same issue. Make sure you're really in the correct directory in your terminal.

In my case, I made a directory called "javascript-exercises" and cloned the repo in it which meant I had a child directory also called "javascript-exercises" within it. When I deleted the child directory and copied all the files into the parent directory, the npm install worked.

Xab Ion
  • 1,105
  • 1
  • 11
  • 20