Closed dbj closed 3 years ago
running npm install does not run the postinstall script
npm install
I'm running on macOS Big Sur 11.1 on Apple Silicon (M1).
For "postinstall" to run after an npm install, it needs to be in the "scripts" object.
package.json currently is:
package.json
{ "name": "elm-pages-example", "private": true, "version": "1.0.0", "scripts": { "start": "elm-pages develop", "serve": "npm run build && http-server ./dist -a localhost -p 3000 -c-1", "build": "elm-pages build" }, "postinstall": "elm-tooling install", "dependencies": { "elm-pages": "^1.5.4" }, "devDependencies": { "elm-tooling": "^1.0.0", "http-server": "^0.12.3" } }
package.json should be:
{ "name": "elm-pages-example", "private": true, "version": "1.0.0", "scripts": { "start": "elm-pages develop", "serve": "npm run build && http-server ./dist -a localhost -p 3000 -c-1", "build": "elm-pages build", "postinstall": "elm-tooling install" }, "dependencies": { "elm-pages": "^1.5.4" }, "devDependencies": { "elm-tooling": "^1.0.0", "http-server": "^0.12.3" } }
Thank you, good catch!
running
npm install
does not run the postinstall scriptSteps to Reproduce
npm install
Configuration
I'm running on macOS Big Sur 11.1 on Apple Silicon (M1).
Fix
For "postinstall" to run after an
npm install
, it needs to be in the "scripts" object.package.json
currently is:package.json
should be: