Skip to content
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

simplifyify fails to pick browserify-shim out of package.json #8

Open
cfv1984 opened this issue Apr 12, 2016 · 3 comments
Open

simplifyify fails to pick browserify-shim out of package.json #8

cfv1984 opened this issue Apr 12, 2016 · 3 comments

Comments

@cfv1984
Copy link

cfv1984 commented Apr 12, 2016

This block:

  "main": "js/src/app/bootstrap.js",
  "browserify": {
    "transform": [
      "browserify-shim"
    ]
  },
  "browserify-shim": {
    "./js/vendor/history.js": "history",
    "./js/vendor/bluebird/js/browser/bluebird.js": "bluebird"
  }

Generates a proper JS when using browserify 13.0.0 , but fails when using simplifyify, with message:

Error reading Browserify transforms for js/src/App/bootstrap.js
Cannot find module 'browserify-shim'
```. What am I doing wrong exactly? 
@JamesMessinger
Copy link
Member

Do you have browserify-shim installed? Based on the error message, it sounds like it can't find it the node_modules folder.

@cfv1984
Copy link
Author

cfv1984 commented Apr 13, 2016

Browserify is picking the shim just fine from what I'm seeing in the result
JS
On 13 Apr 2016 14:12, "James Messinger" notifications@github.com wrote:

Do you have browserify-shim installed? Based on the error message, it
sounds like it can't find it the node_modules folder.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#8 (comment)

@ghost
Copy link

ghost commented Apr 13, 2016

I think your problem may be similar to one I had today when using a command line to bundle files in my project/client/scr directory. The command line was issued from the /project directory where the main package.json also resided. I also had a package.json in my /project/client directory. I believe simplifyify starts looking for a package.json starting at /project/client/scr in my case and walks up the directory structure until it finds one. So it found and used the one in my /project/client directory instead of the one in /project. This caused my babelify transform not to be run as I had the entry in the /project/package.json not the /project/client/project.json. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants