3

I'm having an issue installing npm modules in the client side of my react app. I'm also unable to deploy to Heroku due to this error. Here is the exact error:

`npm ERR! code EINVALIDPACKAGENAME
 npm ERR! Invalid package name "node_modules": node_modules is a blacklisted 
 name
 npm ERR! A complete log of this run can be found in:
 npm ERR!     /tmp/npmcache.BBwm7/_logs/2018-05-10T14_10_45_520Z-debug.log
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! grecospie@1.0.0 heroku-postbuild: `cd client/ && npm install && 
 npm install --only=dev --no-shrinkwrap && npm run build`
 npm ERR! Exit status 1
 npm ERR! 
 npm ERR! Failed at the grecospie@1.0.0 heroku-postbuild script.
 npm ERR! This is probably not a problem with npm. There is likely 
 additional logging output above.
 npm ERR! A complete log of this run can be found in:
 npm ERR!     /tmp/npmcache.BBwm7/_logs/2018-05-10T14_10_45_552Z-debug.log`

I'm not sure what other info is required as I'm not quite sure what's going on, please let me know what I should add. Also there is no node_modules package in my package.json.

keggatron
  • 81
  • 2
  • 4

1 Answers1

0

I assume package.json file is missing in your project IE, you did not run the npm init command when you created the project.

Run npm init from your projects root folder and then npm Install... for all your packages