how can i fix this error, EACCES: permission denied, open '/home/username/Test/networks.js’
I get the error whenever i try to deploy to public test network. Deploying to development network with ganache works fine.
Am following the tutorial to Deploy to Public. Network
Hi @costech,
I am not sure why you have no permissions on networks.js.
I just created a new project and this is what my permissions look like:
$ ls -l
total 0
drwxrwxrwx 1 abcoathup abcoathup 4096 Oct 14 09:43 contracts
-rwxrwxrwx 1 abcoathup abcoathup 197 Oct 14 09:43 networks.js
-rwxrwxrwx 1 abcoathup abcoathup 221 Oct 14 09:43 package.json
I suggest creating a new project folder and trying again.
You shouldn’t need to use sudo. If you are not already you may want to look at using nvm. See npm documentation for details on the recommendation to use a node version manager:
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Which operating system are you using? I use Windows Subsystem for Linux.
If the tutorial can be improved in any way, let me know.
I will do this now. Thank you
Hi @costech,
Please keep the community updated as would be great to find out what is causing this.
Reinstalling nodejs with NVM didn’t fix this error. How ever I used chmod 666 networks.js command to fix the permission. From Linux Handbook
Hi @costech,
Sorry to hear this is still an issue. If you get a chance it would be great to understand the steps you take when you create a project to narrow down where this occurs. I would love to be able to reproduce so we can work out the fix.
