-
Notifications
You must be signed in to change notification settings - Fork 9
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
Require fails at runtime with "Cannot find module ..' #6
Comments
Experiencing the same issue -- imported module is originally in a child /node_modules directory relative to the importer, and there's no error during build, but in the output bundle, the module appears to be mis-addressed with the @ stand-in. |
Follow up: this is fixed for me by switching from 0.6.1 to 0.6.0, so it seems this commit is connected to it. |
I have this issue as well. I was able to work around the issue by using the following 'configure' function:
This may have some side effects like preventing the caching mechanism from actually working... |
I have a basic sample project here:
https://github.com/ammojamo/gobble-browserify-require-broken
The project builds fine, but gobble-browserify generates a bundle where some (but not all) of the paths have been changed to start with '@' (seems to be some magic in
cacheDependency
). When you attempt to run the javascript in a browser (e.g. open the built index.html), it fails with the error:Uncaught Error: Cannot find module '@/dependency.js'
Maybe related: the output also contains absolute paths (/Users/myname/etc...) and this is impossible to override in the options because gobble-browserify has
options.fullPaths=true
hard coded.P.S. I have tried many build tools in many different languages and Gobble is easily my favourite. Well done! I just love the simplicity of it and confidence with which I can write custom transformations if I need to.
The text was updated successfully, but these errors were encountered: