-
Notifications
You must be signed in to change notification settings - Fork 28
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
Build fails when using ember-cli-ramdisk #16
Comments
Browserify is picky about where your tmp folder lives relative to your node_modules folder. If you can mount the actual ramdisk at your-app/tmp instead of just symlinking it, that would probably solve this. Alternatively, you could try symlinking your node_modules folder into the real ramdisk location, so that code being built there can find it via normal node rules. |
@ef4, moving node_modules to /mnt/EmberCliRamdisk//node_modules/ and symlinking back to my project folder seems to be working . . . as long as I don't reboot. :-o I think I'll just move my Ember project folders to my HDD and avoid the hassle. Thanks for explaining the cause. |
@ef4 we have plans to move the tmp folder outside of the project. We will likely need to fixup how ember-browserify works for that. Can we inform browserify of the correct node_modules root/package.json to review? |
As far as I know it's not easy. browserify is trying hard to maintain normal node semantics. node is really picky about only using the node_modules hierarchy. So I think the right thing to make sure that the project's node_modules is available within the build tree that gets passed to browserify. A symlink should suffice. |
@ef4 if symlink works, then fantastic. But does leave our windows friends in a bad spot. I wonder if we can bend substacks arm |
It worked for me with symlinking node_modules. How would this work for multiple projects if tmp and node_modules both live outside the project folder? I like that ember-cli is self contained as it is now. |
node_modules will remain in the project, tmp will not. It is a hazard for editors and other tools watching `tmp/* |
@ef4 this will also break with broccoli v1, one thing we could do is make a custom browserify-tmp dir in the project root, thoughts? |
This will actually need to be revisited, when broccoli 1.0 happens and tmp moves to system tmp. The solution is to symlink (and junction for our windows friends) in node_modules to the basedir of browserify. |
I created an issue at ember-cli-ramdisk [https://github.com/FutureProofRetail/ember-cli-ramdisk/issues/8], but thought you might like to know about this as well. When using that addon, I am unable to import modules. For example if I try to
import moment from 'npm:moment';
I get the error:I have no idea what the actual problem is, which is why I brought it up in both repos.
The text was updated successfully, but these errors were encountered: