`wasp start` throws an access denied npm error
I'm getting this error when I try to start a newly built project: https://gist.github.com/cyberglot/dbbaa716fc12c339f1c2c8b82f23299c
4 Replies
Hi @cyberglot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the error message you've shared, it appears you're encountering a permission issue when trying to run
wasp start
on your newly created Wasp project. This is a known issue that some users have experienced, particularly on macOS systems. Let's address this problem:
The error suggests that npm doesn't have the necessary permissions to create directories in your project folder. This is likely due to file system permissions on your machine.
Here are a few potential solutions you can try:
1. Run the command with sudo:
Try running sudo wasp start
. However, be cautious when using sudo with npm as it can lead to permission issues in the future.
2. Change ownership of the project directory:
Run sudo chown -R $(whoami) .
in your project directory to make sure you own all the files.
3. Use npm's built-in fix:
Run npm cache clean --force
followed by npm rebuild
.
4. Ensure you're using the correct Node.js version:
Wasp requires Node.js version 18.12.0 or higher. Make sure you're using a compatible version by running node --version
.
If these solutions don't work, you might want to try creating a new project in a different directory, preferably one where you're sure you have full read/write permissions.
For more detailed information and discussion on similar issues, you can refer to these resources:
1. Discord support thread: Wasp start
2. Github Issue: Getting Started Issues
If you continue to face issues, it would be helpful to provide more information about your system setup, including your OS version, Node.js version, and the exact steps you took to create and start the project.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @cyberglot, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?I see. my npm doesn't have any permissions 😅 I'mma make a docker container to deal with that

Could you maybe try doing
npm cache clean --force
?