Does this sound familiar?
$ git pull upstream master
$ npm run build
ERROR! ERROR! ERROR! ERROR!
5 to 15 minutes of searching and finally
$ npm install
$ npm run build
build complete
The dependencies changed, you didn't notice, and doh! Okay, maybe that only happens to me? 😊
Well, you can fix that with ld-check-dependencies
. Just add it to your build script in your package.json
as in
...
"scripts": {
"build": "ld-check-dependencies && rollup ..."
},
...
Now when you build if your dependencies are out of date you'll get told to run npm install
The best part is ld-check-dependencies
is tiny. It's only 9 lines of code, 0 dependencies.
photo by: Rikki's Refuge
Top comments (1)
Say goodbay to ‘npm install’, no need ‘npm install’, throw away ‘npm install’.