wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.63k stars 1.18k forks source link

Permission denied when doing `wasp new project` with waspc_datadir containing read-only sub-directories #1161

Open fanshi1028 opened 1 year ago

fanshi1028 commented 1 year ago

Describe the bug permission denied when doing wasp new project with waspc_datadir containing read-only sub-directories

To Reproduce Steps to reproduce the behavior:

  1. make waspc_datadir's sub-directories read-only.
  2. cd /Users/user/projects
  3. wasp new wasp-project
  4. See error wasp: /Users/user/project/wasp-project/src/server: createDirectory: permission denied (Permission denied)

Expected behavior wasp new wasp-project works.

Desktop (please complete the following information):

Additional context Took a rough look, I believe this issue should come from this copyDirRecur So I open a PR at the path-io repo to fix copyDirRecur, which should in turn fix this issue, given it is merged and then we update path-io to that version. Meanwhile, I open this issue to track this niche issue.

Additional additional context I use nix like this to setup waspc, that is why the whole waspc_datadir is read-only.

Martinsos commented 1 year ago

Thanks @fanshi1028 ! This is quite a specific situation, but you are right, Wasp should work in this case, so thanks for opening this up and for creating a PR for path-io repo.

I am interested, how is it that you used nix to setup waspc, and not just typical wasp installation?

fanshi1028 commented 1 year ago

Thanks @fanshi1028 ! This is quite a specific situation, but you are right, Wasp should work in this case, so thanks for opening this up and for creating a PR for path-io repo.

I am interested, how is it that you used nix to setup waspc, and not just typical wasp installation?

I kind of felt lazy and just nixified it in a minimal way(didn't build it from source). I just fetched the released tar from github and installed it like the install script in get-wasp, so it was a breeze, even with that bug.