Can't "npm install @openzeppelin/contracts" from episode 5 in cloning rarible

S C:\Users\andre\Desktop\school_work\Blockchain_developement\nft_Market\contracts> npm install @openzeppelin/contracts
npm WARN [email protected] requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ @openzeppelin/[email protected]
updated 1 package and audited 356 packages in 3.937s

45 packages are looking for funding
  run `npm fund` for details

found 362 vulnerabilities (1 low, 361 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details
PS C:\Users\andre\Desktop\school_work\Blockchain_developement\nft_Market\contracts> 

Above is the output inside my terminal after running ā€œnpm install @openzeppelin/contractsā€ . No node module is created. Any ideas as to why this is?

NB: Iā€™ve already tried installing popper.js but itā€™s the same error when I try to npm install it. Already updated node.js to itā€™s most recent recommended version as well. Thanks to anyone that attempts to help

There are no error messages (only warnings)ā€¦ it was installed somewhere

  • Make sure you call npm install from the project base directory
    • The snippet you posted shows the directory as \nft_Market\contractsā€¦ is \nft_Market the base directory?
    • If you find node_modules in \nft_Market\contract\node_modules you can delete it if thatā€™s not the base directory then install it again from the proper directory
  • Have you called npm init at some point in the past?
    • If you have you should have package.json file in your project base directory
    • The first time you use npm install a package-lock.json file is also created but you wonā€™t have a package.json file unless youā€™ve run npm init

Hope that helps.

1 Like

Thank you! I hadnā€™t done npm init earlier because I thought that was packaged into ā€œtruffle initā€ for some reason. That is definitely not the case which I should have realized since i had no ā€œpackage-lock.jsonā€. Iā€™ll use the experience I gain now to help the community in the future. Thank you so much for your help again mayjer.