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

npm i && npm test fails #30

Open
jjoekoullas opened this issue Jun 17, 2019 · 3 comments
Open

npm i && npm test fails #30

jjoekoullas opened this issue Jun 17, 2019 · 3 comments

Comments

@jjoekoullas
Copy link

Cloned this repo and ran npm i && npm test - tests immediately failed.

module.js:549
    throw err;
    ^

Error: Cannot find module 'karma'
@jjoekoullas
Copy link
Author

I see there's a clean-install npm script which installs karma & jsdom via the command line.

Is there a particular reason these weren't listed as devDependencies instead?

@jjoekoullas
Copy link
Author

npm run clean-install && npm test fails with

added 341 packages in 181.227s
ln: failed to create symbolic link 'node_modules/karma-jsdom-launcher' -> '../': File name too long
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean-install: `rm -rf node_modules/ && npm install && npm install --no-save karma@4 jsdom@13 && ln -s ../ node_modules/karma-jsdom-launcher`

@badeball
Copy link
Owner

Is there a particular reason these weren't listed as devDependencies instead?

Yes, but it's no longer entirely clear to me anymore, IE. kind of historical reasons.

NPM has a history of being notorously bad for library developers developing libraries with peer dependencies [1] and Yarn isn't any better [2]. I seem to recall behavior changing somewhat frequently between major versions, while the most common use cases with NPM remains stable.

[1] npm/npm#11213
[2] yarnpkg/yarn#1503

What I'm looking for is a way to install all combinations of peer dependencies, while

  1. being easy to use
  2. not create noice (ie. not modify package-lock, etc.)

If you (or anyone else) know of a solution that satisfies those requirements, then shout out.

In Ruby-land, I think I would have multiple lock-files, one for each combination. However, I don't think this is possible with NPM.

npm run clean-install && npm test fails with

[...]
File name too long

Are you running this on Windows? This will probably not work, as I've assumed in package.json for / to be file separator.

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

No branches or pull requests

2 participants