Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install package with npm #211

Closed
pkpio opened this issue Aug 3, 2019 · 1 comment · Fixed by #252
Closed

Cannot install package with npm #211

pkpio opened this issue Aug 3, 2019 · 1 comment · Fixed by #252

Comments

@pkpio
Copy link

pkpio commented Aug 3, 2019

I keep getting this error whenever I try to install

> mongodb-memory-server@5.1.10 postinstall /Users/praveen/Works/whos-in-bot/node_modules/mongodb-memory-server
> node ./postinstall.js

/Users/praveen/Works/whos-in-bot/node_modules/find-cache-dir/node_modules/find-up/index.js:29
		const foundPath = await runMatcher({...options, cwd: directory});
		                                    ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/praveen/Works/whos-in-bot/node_modules/find-cache-dir/node_modules/pkg-dir/index.js:3:16)
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none was installed.
npm ERR! Darwin 18.6.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! mongodb-memory-server@5.1.10 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mongodb-memory-server@5.1.10 postinstall script 'node ./postinstall.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mongodb-memory-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./postinstall.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mongodb-memory-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mongodb-memory-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/praveen/.npm/_logs/2019-08-03T01_47_49_348Z-debug.log

When I downgraded the version to 5.0.4, it worked!

@hasezoey
Copy link
Collaborator

your nodejs version is too old, it dosnt support the ... (rest parameters)

nodkz added a commit that referenced this issue Dec 26, 2019
…code & add TSDoc (tnx @hasezoey)

* fixing typos and making examples use a common style (instead of callback-async, only async)

* adding many TSDoc
modify code for typescript 3.7 with optional chaining
adding static function "create"

* Replace all "getConnectionString" with "getUri" in the examples

* adding a "requirements" section to README
adding "engines" to -core package

fixes #211

* removing accidental logging

* add check to "stop" if already stopped

* Outsource "getLinuxInfomation" sources to own functions
- add Environment Variable "FORCE_LSB_RELEASE"
- add Environment Variable "FORCE_OS_RELEASE"
- add Environment Variable "FORCE_RELEASE"
- add Environment Variable "SKIP_LSB_RELEASE"
- add Environment Variable "SKIP_OS_RELEASE"
- add Environment Variable "SKIP_RELEASE"

fixes #184 (comment)

* fix typo

* tryLSB: ignore error if "FORCE_LSB_RELEASE" is unset

* Add test for MongoMemoryServer.create

* Adding a .gitignore file (VSCode ESLint plugin)
explicitly specify eslint config for "core" lint script

* vscode settings: remove "autoFix" because it is enabled by default (eslint suggestion)
replace all "process.env" with "resolveConfig"

* change "yarn" to "npm" to keep is consitent and so everyone can execute it
remove "&& npm run tscheck" because it is now covered by lint

* Remvoe all SKIP* environment variable
rename all FORCE* to "USE_LINUX_"
rename "RELEASE" to "ANYFILE_RELEASE"
add getos-environment variables to README

* remove "private" add "@Private"
vscode: force 2 space indentation

* chore: fix eslint+prettier problem

* fix deprecated vscode-eslint setting

* docs: add @hasezoey to mainteiners

* chore: return back `eslint.autoFixOnSave` cause source.fixAll.eslint does not work for me

* refactor: Object.assign -> { ...{}, ...{} }

* remove comented-out import
fix comment-typo

* remove debugging console.log

Co-authored-by: Pablo Damnhorns <pavel.chertorogov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants