Brian
Brian

Reputation: 1808

Command line tools can't access Documents after upgrading to MacOS Sonoma

This morning I upgraded to MacOS Sonoma on my development machine, and now none of my command line tools can access my git repos stored in my Documents directory. git, npm, node, npx, etc... all don't work any more. They just hang.

I was able to use the Privacy & Security to enable git to access Documents (after pressing cmd-shift-. so I felt like I was making progress, but then npm also didn't work and it seemed like there is something more systemically wrong. What is the proper way to enable my development tools to access the Documents directory?

Update

I moved the repos from ~/Documents/GitHub (the default dir for GitHub Desktop) up to ~/github and now all of the command line tools work again. This got me back to work, but I'm going to leave the question open because I think we all still need to know how to make npm, node, etc... work within Documents.

Upvotes: 3

Views: 2292

Answers (7)

Salem Moussa
Salem Moussa

Reputation: 35

The solution that worked for me is to uninstall Node version that I had installed NVM and use homebrew for the packages instead.

For beginners , make sure that new Node/NPM paths are hombrew ones like here using which node which npm :

/opt/homebrew/bin/node
/opt/homebrew/bin/npm

Instead of

/usr/local/bin/node
/usr/local/bin/npm
  1. Commands to delete Node/npm:

    sudo rm /usr/local/bin/npm sudo rm /usr/local/bin/node

  2. brew install node , npm

  3. Then check new paths :

    which node which npm

Also , after Sonoma terminal with npm is a bit slower then usual

Upvotes: 1

Joscaz
Joscaz

Reputation: 23

I needed to update everything. For brew I did:

brew update-reset

Upvotes: 1

Fariss
Fariss

Reputation: 11

I have resolved the issue by doing the following steps:

  1. upgrade brew
  2. upgrade node
  3. remove package-lock.json file
  4. remove node_modules folder
  5. execute npm i

Hope that it will help

Upvotes: 0

mamoru
mamoru

Reputation: 21

I had the exact same symptoms. There was a Document in iCloudDrive, and the local files disappeared for some reason, leading to a re-download which I believe caused the issue. npm, git, vscode - none of them worked. However, by moving the repository files from Document to another directory like User/[username]/Clone, I was able to resolve the issue.

Upvotes: 2

krgraver
krgraver

Reputation: 11

Updating Privacy & Security settings didn't help for me, I was only able to resolve the issue by updating Xcode to the latest version compatible with Sonoma.

Upvotes: 1

Arsenii Kopaev
Arsenii Kopaev

Reputation: 13

Same issue. Tried to reinstall node, reinstall npm. It doesn’t work. But my other project on vite feel fine. But for me helped changing directory from Documents to Home folder. I’ve also noticed, that my files were on iCloud, and I can’t download it for some reasons, so maybe it’s caused this problem.

Upvotes: 1

Rayon Hunte
Rayon Hunte

Reputation: 112

I was able to resolve this by going to the Privacy and Security settings. Developer Tools and Giving eternal access, Now the command line works, but all the build processes are very slow.

Upvotes: 1

Related Questions