How do I fix this error?
USER@Bahus-MacBook-Air metaplex-master % npm --version
8\.5.2
USER@Bahus-MacBook-Air metaplex-master % npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/USER/Desktop/solana devnet/metaplex-master/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/USER/Desktop/solana devnet/metaplex-master/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/USER/.npm/\_logs/2022-03-24T13_07_17_630Z-debug-0.log
How do I fix this npm installation error in visual studio code in Mac?
CodePudding user response:
The error message says that the path where you are executing npm i
command doesn't have package.json file.
Make sure to change the path to the place where the package.json file is located.
CodePudding user response:
I'm assuming you are trying this project https://github.com/metaplex-foundation/metaplex
And you are probably running npm install
in the main directory. But if you read the instalation documentation which you definitely should, then you would see cd metaplex/js
which means you need to run npm install
within the ./js
folder since that's where the package.json
is, which is required by npm install
command.