Comments (7)
Can you expand on what you expect the behavior should be?
from generator-karma.
Of course, sorry for the sort description.
May be I'm wrong but I expect this two commands to be equivalent:
This:
yo karma --skip-install & npm install
And this:
yo karma
It turns out that the first one fails as no dependency is added to package.json, because npm install is used to do so with the --save-dev option.
This is relevant because I've seen some issues in generator angular because of the concurrent execution of both npm install commands, and I was trying to solve it by passing skip-install to karma:app and relying on generator angular install process... But it fails because no karma dependencies are added to the package.json.
from generator-karma.
Ok, that's a bug in this generator who should add it's dependency manually to the package.json
from generator-karma.
I was trying to give a try to solve this by myself when I realized that there's no way to modify the package.json consistently with the npm configuration (check "save-bundle" option and "save-prefix" option at https://github.com/npm/npm/blob/master/lib/install.js#L408) without using npm itself.
Maybe this is only possible if they add a method in npm to modify the package.json that doesn't actually trigger the downloading of artifacts....
I really feel all generator --skip-install should be consistent with a later execution of npm install, but I don't see how to solve my own request in the generator itself. I'm going to fill an issue to npm. Should I close this one or should I keep it and link to the npm one just in case they implement the feature? What do you think?
Thanks!
from generator-karma.
Npm issue: npm/npm#7865
from generator-karma.
I think you're not looking at the issue from the right angle.
This generator should add it's dependency to the package.json file without relying on npm --save
from generator-karma.
This should be solved in 1.0.0
from generator-karma.
Related Issues (20)
- Error while running yo karma HOT 2
- "siblings' peerDependencies requirements" HOT 1
- Handle passing in arrays instead of csv strings HOT 1
- Gruntfile doesn't load karma which causes `Task "karma" not found.` HOT 4
- Getting error: You need to include some adapter that implements __karma__.start method! HOT 1
- Custom Template path
- bower-components-path default HOT 1
- Bower Components
- Cannot fint module 'map-key' HOT 1
- multiple test framework HOT 1
- Gruntfile generator wrong? HOT 1
- Error installing generator HOT 5
- Add option to support multiple frameworks HOT 3
- Drop CoffeeScript in favor of ES6 (Babel) HOT 8
- Using default settings ReferenceError: Phantom is not defined HOT 2
- "Could not open package.json for reading" when running the generator HOT 3
- EPEERINVALID error when trying to update to [email protected] - looking for yo but not finding it? HOT 2
- Error UNMET PEER DEPENDENCY HOT 1
- Deprecating CoffeeScript HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-karma.