Cannot create "/usr/local/bin/create-next-app" due to insufficient permissions. #1595
-
I'm trying to use yarn create next-app but I run into the error
creating a next app requires me to use I can make the project and spin up next-js but modifying the package.json, node modules, yarn.lock etc. require root permissions. When this happens, I just type my password into the prompt every time. I then get an error when I try to use web3uikit It says the module isn't found.
So then I tried modifying the package.json and yarn.lock to the repo here. It doesn't really change anything. I'm just assuming I'm getting this error because I start the project as root but I haven't made the project with the user I'm in. I've also tried chown but it didn't change anything. I'm just new to linux to bear with me |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi! At first glance you seem to be having issues with your local yarn/node installation. It appears the default path for a local installation (or prefix) is not set properly, that's why it's complaining about permissions. Will you please show me the output of the following command? In advance, you can modify the contents of that file, to this |
Beta Was this translation helpful? Give feedback.
Hi! At first glance you seem to be having issues with your local yarn/node installation.
It appears the default path for a local installation (or prefix) is not set properly, that's why it's complaining about permissions.
Will you please show me the output of the following command?
↪ cat ~/.npmrc
In advance, you can modify the contents of that file, to this
prefix=/home/<your_username>/.npm-packages