Postinstall disabled, but still runs
See original GitHub issueHello!
Thank you for this package!
I have a build environment which uses a docker image to build. Unfortunately I cannot use auto-download, baceuse corporate proxy and http-proxy-agent fails…
However, I can download the mongod binary with wget before installing the mongodb-memory-server package.
I downloded the package, decompressed, set +x, and exported the MONGOMS_SYSTEM_BINARY to the absolute path of the binary (/builds/company/project-core/node_modules/mongodb-binary/bin/mongod)
mongod --version
prints the following:
db version v4.0.3
git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
OpenSSL version: OpenSSL 1.1.0k 28 May 2019
allocator: tcmalloc
modules: none
build environment:
distmod: debian92
distarch: x86_64
target_arch: x86_64
However the build fails with:
error /builds/company/project-core/node_modules/mongodb-memory-server: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments:
Directory: /builds/company/project-core/node_modules/mongodb-memory-server
Output:
mongodb-memory-server: checking MongoDB binaries cache...
events.js:186
throw er; // Unhandled 'error' event
^
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1317:34)
at TLSSocket.emit (events.js:209:13)
at TLSSocket._finishInit (_tls_wrap.js:792:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (_http_client.js:406:9)
at TLSSocket.emit (events.js:209:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}
Since MONGOMS_SYSTEM_BINARY is set, I would not expect that mongodb-memory-server wants to download in the postinstall step.
Could you help me what am I missing, please?
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (2 by maintainers)
Top Results From Across the Web
npm: disable postinstall script for package - Stack Overflow
I wanted to disable postinstall script for my project but wanted all scripts of my project's dependencies to run when I do npm...
Read more >Disable WSUS postinstall prompt - WSUS up and running but ...
Hello,. We have a problem with a WSUS installation on a 2012 R2 Server. I have moved the SUSDB to a SQL Server...
Read more >Postinstall scripts are not being run(solved)
I'm trying to get my server up and running, but the process is everything but transparent. My server uses Prisma (an ORM), which...
Read more >Preventing npm from Executing Arbitrary Scripts - NerdyCode
One solution is to disable running scripts by default, but this doesn't come without its own issues, as we'll see. Ignoring npm Scripts...
Read more >Change Installation Settings after Installation - Tableau Help
To enable Web Page objects again, run the same command but specify -integer 1 instead of -integer 0 . Disable Dashboard extensions (Tableau...
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
@sinashk78
DISABLE_POSTINSTALL
is to disable the npm hookpostinstall
, not the runtime one, i think for that you search for #355the
VERSION
config option is to set the mongod version to download, not the package version, for that you have thedependencies
/devDependencies
section(and version of mongodb above
4.4
dosnt exist yet)in 6.9.x the
systemBinary
is checked if it exists and is an file and then used, otherwise an mongod file will be downloaded according to the other optionswhen you use the same config options for both systems (yours and your friends), then it is most likely that the
SYSTEM_BINARY
path just dosnt exists for your frienduntil proven otherwise, i will close this as fixed by #405