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
Problem with npm dependency resolution #20
Comments
+1 it would be cool to figure out what's causing this |
@manuelbernhardt Are you seeing this problem when running on Ubuntu? I get this error on 4 different Ubuntu machines but it works fine on a Mac |
I'm unsure whether I've previously asked this question, so apologies if so, but what engine is being used i.e. have we tried this using Node as the engine? |
I reported the issue together with Manuel. @aparkinson I am seeing this issue on the Mac. Essential for reproducing the issue to remove the @huntc Node is being used as engine. It is not set explicitly in sbt-js-engine-tester but I have I can also reproduce the issue when using Trireme. |
I will take a look soon. Thanks for the detailed explanations everyone. |
I successfully ran the workaround
both with Linux (Ubuntu) and with Mac OS X. Note: On Ubuntu Linux node-gyp requires the build-essential package and on Mac OS X the XCode Command Line Tools. |
I tried to figure out what was going on here today and didn't find anything useful, but I don't know this code well. I'm not sure whether it's an sbt-js-engine bug, but would be interested in what's going. The other issue you filed (playframework/playframework#3565) pretty clearly does look like a bug in sbt-js-engine or play though and I think is more frustrating too |
I have a Play 2.3.8 Java project, which I generate the view Asssets with Yeoman (Angularjs seed) and I put grunt, bower, npm, package.json in same project. When I run ./activator test there're a message related to web-assets:jseNpmNodeModules task. I can ran tests in Eclipse. I can run the app normally when I developing. I executed npm install node-gyp and rerun the test and it did not resolve my issue. The error log is: akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://sbt-web/user/$a#-1891362858]] after [120000 ms] |
For me the workaround works fine in Mac OS but in ubuntu I get the following error: java.lang.RuntimeException: Problems with NPM resolution. Aborting build. |
It looks like we need to upgrade npm, this issue is unrelated to js-engine itself, since it can be reproduced with just node:
|
Ok, I should have looked more carefully, the error is obvious, the npm webjar is not setting the executable bit on node-gyp. After a failed build, run:
Then run it again, and it works. |
Solving this generally is going to be really hard. The npm webjar can be fixed to contain the right permissions, but the big problem is that the JDK zip support does not support file permissions, and so when sbt unzips it, which uses the JDK zip support, those permissions are not going to be there. I think for now, the best thing to do is to hack it - specifically make that particular file executable. |
Fixed in #35. |
Oh, I see. I thought it was only unzipping that's a problem, but it does appear that zipping it is done incorrectly as well. This can be verified by grabbing the jar. I wonder if this is really the only module we'll have this problem with. It seems rather silly to take things that are in npm and repackage them into jars such that we lose all the file permissions in the process. Can't we just grab directly from npm instead? This would work much better:
|
This also adds file permissions as per: webjars/webjars-locator-core#3 In order to fix: sbt/sbt-js-engine#20
This also ensures file permissions are maintained in order to fix: sbt/sbt-js-engine#20
This appears to be fixed now. Woohoo! Huge thanks to @jroper for this |
There seems to be an issue when attempting to resolve npm modules declared in
package.json
when they depend upon thenode-gyp
package. Steps to reproduce:sbt-js-engine-tester
project:when that one package gets installed by hand previously (
npm install node-gyp
) the command runs without a hitch.The text was updated successfully, but these errors were encountered: