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

When using ember try:each, npm install doesn't always seem to be executed #70

Closed
workmanw opened this issue Mar 25, 2016 · 2 comments
Closed

Comments

@workmanw
Copy link

I discovered that when using ember-try with npm overrides, that when I execute ember try:each it doesn't always invoke npm install between scenarios.

I've got two branches that demonstrate this problem.

The first branch demonstrates the problem: ember-try-broken. Here is a console log when the issue occurs: gist log. Search for "Missing npm packages" to find the errors.

To reproduce the problem, you should be able to checkout that branch, npm install && bower install, then run ember-try. You'll see the following error on every other scenario: Runnpm installto install missing dependencies.

Now I have a second branch that has a simple workaround to demonstrate this is the problem: ember-try-workaround. On this branch I have a custom ember-try command that effective does npm install && ember test. If you look at the commit 2d180a92 you can see how simple it is.

So based on those two branches, it seems the problem is that npm install is not properly called between scenarios. I'd be happy to try to fix this, but I don't even know where to begin.

@workmanw
Copy link
Author

After spending a few hours debugging this, I'm not sure it's actually an ember-try issue.

Using node-debug and setting the right breakpoints I can see that my node_modules gets into a state where when we do npm install it only installs the devDependencies, it does not install the dependencies. Then when it tries to run ember test the ember-cli-dependency-checker throws this exception. Calling npm install a second time it does install the dependencies.

I'm not sure what's going on. Maybe NPM has some kind of other package cache and it thinks that the dependencies are already installed.

@workmanw
Copy link
Author

Turned out it was an NPM bug npm/npm#10727. Sorry for the noise here, but glad I got to the bottom of it. Upgrading to npm 3.8.3 fixed the issue.

workmanw pushed a commit to adopted-ember-addons/ember-data-model-fragments that referenced this issue Mar 25, 2016
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

1 participant