-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Transient "cannot find module" when running gulp test #14166
Comments
On Travis, I'm fairly certain this has to do with a stale cache. I recently deleted the
Let me know if this eliminates the error for you. |
It would also be useful to understand how you're running these tests. Are you simply running |
Could it be that you're seeing the same error as described in admc/wd#520? If so, it might be due to a Sauce Labs error :/ |
I don't think it's the same as in #520. Will update if it happens again, though FYI I currently have no near-term AMP work on my plate. If nobody else sees this, feel free to just close. |
@rsimha Here is an example. I ran the following commands:
...and immediately got:
I realize I used --nobuild in executing the test. But I had just done "gulp build" immediately prior. Shouldn't this work? It always used to. |
Update: Then I ran the same "gulp test" command, without the "--nobuild", and got the same error:
|
@jonkeller Yeah, you should be able to run
|
@jonkeller I tried running your tests, and was able to do so successfully. See https://gist.github.com/rsimha/92f13fdab40452e9d6a1871276a5ed1e (I'm still curious about what could be causing the errors your saw, and would love to fix it if we can find a cause.) |
@rsimha
1. Yes, that is the correct path. I do create a subdir off of ~/workspace
for each branch.
2. Didn't know about --unit, will use this in the future. Thanks!
It does seem flakey - I repeated the same commands a few minutes later and
it worked fine. Then I ran "gulp test
--files=extensions/amp-analytics/0.1/test/test-visibility-manager.js
--nobuild" and it failed with the same error message, and /immediately/
re-ran the same command and it worked. (Well, I mean it ran the tests...but
the test I am actively working on did not pass, but is not expected to at
this point :)
…On Wed, Apr 11, 2018 at 3:33 PM Raghu Simha ***@***.***> wrote:
@jonkeller <https://github.com/jonkeller> I tried running your tests, and
was able to do so successfully. See
https://gist.github.com/rsimha/92f13fdab40452e9d6a1871276a5ed1e
(I'm still curious about what could be causing the errors your saw, and
would love to fix it if we can find a cause.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14166 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACV2By7M-Qkw2By0qchyiEQxDlaan7z8ks5tnlqCgaJpZM4S0PH3>
.
|
@jonkeller I suspect this might have to do with you not using If we find out what the issue is, we can certainly apply a more general fix. |
Ok, sounds good to me. I will use --unit from now on. Thanks!
cc: @bradfrizzell
…On Wed, Apr 11, 2018 at 3:54 PM Raghu Simha ***@***.***> wrote:
@jonkeller <https://github.com/jonkeller> I suspect this might have to do
with you not using --unit. When you run a unit test with --unit, the set
of test files includes just the unit tests. When you run a unit test
without --unit, the entire build directory is included in the list of
test files. This could be messing with your tests due to some logic in some
component somewhere.
If we find out what the issue is, we can certainly apply a more general
fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14166 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACV2B5io96XVwC4wc3TnwFFudbN2whknks5tnl-AgaJpZM4S0PH3>
.
|
This is still happening. According to browserify/browserify#1271, it probably has to do with paths being specified incorrectly. |
This is still happening. I have a hunch this is due to gulpjs/gulp#1412 (comment) Reopening to try a fix. /cc @choumx |
Hmm. We're running into this while running /cc @erwinmombay |
Thanks for looking into this. I have a couple PRs where retrying the job doesn't seem to help. The failures seems to have gotten more consistent over the last few days. |
Here are some issues that could be related to what we're seeing: nikku/karma-browserify#114 Will read up some more, and try increasing |
Reopening. More logs: https://travis-ci.org/ampproject/amphtml/jobs/414260065#L668 |
It's quite likely that this is due to nikku/karma-browserify#114. The disk speed on Travis is slow, so we should wait longer than a second for all files to be loaded by the Karma server before the
PR coming up. |
bradfrizzell and I have been experiencing frequent errors like the following when running "gulp test", both locally on our machines as well as on Travis. Restarting the test, or rebuilding and then re-running the test, generally fix the issue.
The module that can't be found seems to vary.
The text was updated successfully, but these errors were encountered: