Default location of projects.json has changed
Opened this issue ยท 3 comments
When reinstalling and setting up VSCode on a new mac, I noticed this extension wasn't working. What I found is that the path to projects.json
has changed.
Since the new path seems to be the default (a pr that fixes this issue for the new path but breaks the old path can be found here), I see a couple options, but there may be better solutions:
- Edit the code to search for both paths and check where the projects.json file is when invoking the extension:
.../User/projects.json
and.../User/globalStorage/alefragnani.project-manager/projects.json
To reduce usage you can set a flag stating which path contains the projects.json file and subsequently use that path. - Update the documentation stating where you can change the location of projects.json in vscode.
A workaround proposed by a member below states you could also do the following and create a symlink to theprojects.json
file:
cd ~/Library/Application\ Support/Code/User/ # or wherever your file is located
ln -s globalStorage/alefragnani.project-manager/projects.json projects.json
I just wanted to bring this back up because it's an issue I faced and I find this extension super useful, so not being able to use it would be no bueno. Thanks!
I have the same problem.
Error: ENOENT: no such file or directory, open '/Users/hander/Library/Application Support/Code/User/projects.json'
-
Visual Studio Code 2.1.0
Alfred 3.8.1
darwin x64 17.7.0
Looking forward to the fix. ๐
In the mean time, a workaround is to symlink the old file location to the new:
cd ~/Library/Application\ Support/Code/User/ # or wherever your file is located
ln -s globalStorage/alefragnani.project-manager/projects.json projects.json
Again, not a fix, but a workaround and seemed to work for me. ๐
You can also change the location of the project.json
in the extension configurations. Go to the settings, then type: projectsLocation
and paste the location expected by this workflow: ~/Library/Application\ Support/Code/User/
. That worked for me.