- #NPM CONFIG SET PREFIX CANT READ PROPERTY OF UNDEFINED INSTALL#
- #NPM CONFIG SET PREFIX CANT READ PROPERTY OF UNDEFINED PASSWORD#
npm init -y & npm i -save-dev node16 & npm config set prefix (pwd)/nodemodules/node & & export PATH. For those who say cant past it: You must right click and click paste it, not ctrl + v and paste it. If everything went well, you should see a 'Happy Hacking' message as the last line. npm init -y & npm i -save-dev node16 & npm config set prefix (pwd) /nodemodules/node & export PATH (pwd) /node.
#NPM CONFIG SET PREFIX CANT READ PROPERTY OF UNDEFINED INSTALL#
Step 10: Type 'Y' to install create-react-app package Step 8: Set prefix properly this time -> npm config set prefix /usr/local Step 5: Clear npm cache again -> npm cache clean -force Step 4: Install latest npm -> npm install -g -force Step 3: Clear npm cache by force -> npm cache clean -force
#NPM CONFIG SET PREFIX CANT READ PROPERTY OF UNDEFINED PASSWORD#
Step 2: Enter your root credential password Step 1 : On your terminal get into root account by typing -> sudo -I Anyway, here are the steps I took to resolve the issue. Now, when I try and run - % npx create-react-app myAppĮrror: EPERM: operation not permitted, mkdir '/usr/loca'īecause there is no directory by name 'loca'.įew suggestions about disabling SIP to make it work are there but I think it's not a good idea.
The problem is with: % npm config set prefix /usr/locaĪs you can notice from the above, I forgot the letter 'l' at the end of the line leading to npm config setting my 'prefix' to /usr/loca Thought it might help people who are facing a similar issue. Took me about 2 hours to figure this out. TypeError: Cannot read property 'loaded' of undefinedĪt exit (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:97:27)Īt process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:216:3)Īt process._fatalException (internal/process/execution.js:150:25) usr/local/lib/node_modules/npm/lib/utils/error-handler.js:97 It gets used by the Next.js server and build phases, and it's not included in the browser build. is a regular Node.js module, not a JSON file.
TypeError: Cannot read property 'get' of undefinedĪt errorMessage (/usr/local/lib/node_modules/npm/lib/utils/error-message.js:38:39)Īt errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:201:13)Īt /usr/local/lib/node_modules/npm/bin/npm-cli.js:78:20Īt cb (/usr/local/lib/node_modules/npm/lib/npm.js:225:22)Īt /usr/local/lib/node_modules/npm/lib/npm.js:263:24Īt /usr/local/lib/node_modules/npm/lib/config/core.js:81:7Īt /usr/local/lib/node_modules/npm/lib/config/core.js:80:13Īt f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)Īt afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:171:20) For custom advanced configuration of Next.js, you can create a or file in the root of your project directory (next to package.json). If -g is specified, this will be the value of the global prefix. This is the closest parent directory to contain a package.json file or nodemodules directory, unless -g is also specified. Print the local prefix to standard output. Now if I try to run any npm command it will just throw errors: Error: EPERM: operation not permitted, mkdir '/usr/loca' Note: This command is unaware of workspaces. I found posts suggesting to try: npm config set prefix /usr/local.īut I typed " npm config set prefix /usr/loca" on accident. I was trouble shooting the " ionic: command not found" issue.