postinstall not working in npm 7.x
See original GitHub issueVersions
- NodeJS: 14.16.0
- npm: 7.8.0
- mongodb-memory-server: 6.9.6
- system: MacOS
package: mongo-memory-server
What is the Problem?
No binaries of mongodb are downloaded on npm install
.
Setting"disablePostinstall": "0"
in the packege.json makes no difference
My package.json (striped):
{
"name": "***",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
},
"config": {
"mongodbMemoryServer": {
"version": "4.4.5",
"debug": "1"
}
},
"dependencies": {
"@nestjs/common": "^7.6.15",
"@nestjs/core": "^7.6.15",
"@nestjs/graphql": "^7.10.3",
"@nestjs/mapped-types": "*",
"@nestjs/mongoose": "^7.2.4",
"@nestjs/platform-express": "^7.6.15",
"apollo-server-express": "^2.22.2",
"graphql": "^15.5.0",
"graphql-tools": "^4.0.8",
"lodash": "^4.17.21",
"mongoose": "^5.12.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^6.6.6"
},
"devDependencies": {
"@nestjs/cli": "^7.6.0",
"@nestjs/schematics": "^7.3.0",
"@nestjs/testing": "^7.6.15",
"@types/express": "^4.17.11",
"@types/jest": "^26.0.22",
"@types/node": "^14.14.36",
"@types/supertest": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.6.3",
"mongodb-memory-server": "^6.9.6",
"prettier": "^2.2.1",
"supertest": "^6.1.3",
"ts-jest": "^26.5.4",
"ts-loader": "^8.0.18",
"ts-node": "^9.1.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^4.2.3"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
Do you know why it happenes?
no
Issue Analytics
- State:
- Created 2 years ago
- Comments:22
Top Results From Across the Web
postinstall isn't executing in npm@7 · Issue #776 - GitHub
I am running into this as well, except updating to the beta version is not working in my case. This is on Node...
Read more >NPM not running postinstall - node.js - Stack Overflow
I've installed a custom package called @company/cdk-library. It has package.json scripts: "scripts": { "test": "jest", "build": "tsc", ...
Read more >patch-package - npm
Fix broken node modules with no fuss. Latest version: 6.5.0, ... Start using patch-package in your project by running `npm i patch-package`.
Read more >npm-ci
Run all build scripts (ie, preinstall , install , and postinstall ) scripts for installed packages in the foreground process, sharing standard input,...
Read more >scripts | npm Docs
Runs BEFORE a tarball is packed (on " npm pack ", " npm publish ", and when installing a git dependencies). NOTE: "...
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 Free
Top 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
@seahindeniz thanks for reporting, made an clear issue stating the problem, #478
Currently I have npm
7.13.0
installed and it seems to work without the workaround 👍