Boss Machine NPM Install Errors

Re: https://www.codecademy.com/paths/web-development/tracks/javascript-back-end-development/modules/express-cumulative-project/informationals/bapi-p4-boss-machine

When looking to see if others have had the same issue, I realized that a lot of the questions posted on this forum have not been answered, even from about 8 months ago. I’m concerned that mine may go unnoticed as well, but I’ll post it here anyway on the off chance that it gets noticed and/or someone else has the same issue.

I’m trying to run NPM Install on the Boss Machine project that I downloaded. I have successfully run NPM Install on other projects before this, but here I get an error:

Hash: 55534df65e604341c31e
Version: webpack 3.12.0
Time: 707ms
                    Asset     Size  Chunks             Chunk Names
    ./public/js/bundle.js   4.6 kB       0  [emitted]  main
./public/js/bundle.js.map  2.47 kB       0  [emitted]  main
   [0] ./browser/index.js 2.09 kB {0} [built] [failed] [1 error]

ERROR in ./browser/index.js
Module build failed: SyntaxError: [private directories]/.babelrc: Error while parsing JSON - Unexpected EOF at line 1 column 2 of the JSON5 data. Still to read: ""

I’ve googled the issue, gotten some stack overflows suggestions to try the following terminal commands:

npm cache clean --force rm -rf node_modules package-lock.json
$ npm install

This doesn’t help, I still encounter the same error.

Any help would be really great – I’m 80% of the way through this web development course, I’d hate to have to give up now.

For anyone else who may have had this problem, after more digging around, I found there was a hidden .babelrc file above my root directory for the project which was conflicting with the installation. So I removed it and then re-installed successfully. Hope this helps someone else!

2 Likes

I’ll flag this as an issue to be looked into, maybe we can add it into one of the faqs. Thanks @dstringer18 for figuring it out and sharing!

1 Like