npm install --save hoodie: do not overide "start" script in package.json
See original GitHub issuewhen installing hoodie
, it runs a setup in postinstall
. Among other things, it sets the “start” script (via https://github.com/hoodiehq/hoodie/pull/592)
But if the “start” script is already set, it currently gets overwritten, which it shouldn’t do
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Don't set "hoodie-start" script if "start" script is set to "hoodie" · Issue ...
now, remove the "dependencies" key from your package.json and rm -rf node_modules. Leave the "start": "hoodie" line and run npm install --save hoodie...
Read more >Override `npm install` script for NPM project - Stack Overflow
I tried using this in package.json: "scripts": { "ng": "ng", "start": ...
Read more >[Solved]-overriding package.json scripts - NPM-node.js
You can't "override" package.json because the filename is hardcoded in NPM. You can create another script entry like: "scripts":{ "dev": "yarn dev:build" ...
Read more >13 npm Tricks for Faster JavaScript Development - Medium
In this article, we'll discuss 13 tricks to get the most out of npm: from simple shortcuts to custom npm init scripts. Since...
Read more >@material-ui/lab | Yarn - Package Manager
This package hosts the incubator components that are not yet ready to move to core . Installation. Install the package in your project...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, give it a try! The relevant line is this one: https://github.com/hoodiehq/hoodie/blob/8fa80e1b1ac192c18766b2d8e189529f8c003029/bin/setup.js#L18: Instead of simply setting
packageJson.scripts[ 'start' ]
we should check ifpackageJson.scripts[ 'start' ]
is already set. If it is'hoodie'
and and add alog.info('setup', 'start script already set to "' + packageJson.scripts[ 'start' ] + ', you can start hoodie with "npm run start-hoodie" instead
packageJson.scripts[ 'start-hoodie']
tohoodie
instead.Makes sense?
done via https://github.com/hoodiehq/hoodie/pull/642