-
Notifications
You must be signed in to change notification settings - Fork 264
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 path for vertx.js for browserify v7.0.2. #339
Conversation
Browserify wants to load file from 'dist' folder, but vertx.js is in the root folder.
please use: |
I use gulp for build and I got Error. Error: Cannot find module 'vertx' from '/web/node_modules/rsvp/dist'. It is true because you want to require vertx.js from rsvp/dist folder, but vertx.js is in the root folder. My gulp is: browserify(files.src, {debug: true, insertGlobals : true})
.bundle()
.pipe(source(files.name))
.pipe(gulp.dest(files.dest)) Do you have a solution? |
|
ah we can just do var r = require;
r('vertx'); this will prevent browserify from detecting the require. If you can update the PR accordingly, I'll gladly merge. |
Or use the browser field in package.json, which is cleaner. |
mind linking to a doc on that? |
https://github.com/substack/browserify-handbook#browser-field oops didn't see domenic's reply and forgot to refresh :P |
ah so "browser": {
"vertx": false
} ? |
Thank you for yours suggestions |
Fix for browserify.
Yes, it is possible and I fixed it for me, but I think that rsvp call require vertx so it will call right way. You have empty file vertx.js in root, where is comment 'to make browserify happy about trying to require('vertx')'. What do you think? |
this file was a quick hack that we shouldn't have around. |
Problem with path for vertx.js for browserify v7.0.2.
will investigate the browserify package.json entry later |
Lock specific version of rsvp until tildeio/rsvp.js#339 gets released
Browserify wants to load file from 'dist' folder, but vertx.js is in the root folder.