hung-phan / generator-rails-react-webpack

Integrate Ruby on Rails with React.js and Webpack
56 stars 9 forks source link

gulp javascript:dev -> Cannot call method 'match' of undefined #5

Closed grigio closed 9 years ago

grigio commented 9 years ago

I tried your already generated project but I get this error

ERROR in ./app/frontend/javascripts/main.js
Module build failed: TypeError: /Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/react-hot-loader/index.js!/Users/grigio/+persistant/Code/testing/rails-react-webpack/app/frontend/javascripts/main.js: Cannot call method 'match' of undefined
    at urlParse (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/node_modules/source-map/lib/source-map/util.js:37:22)
    at normalize (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/node_modules/source-map/lib/source-map/util.js:86:15)
    at Array.map (native)
    at SourceMapConsumer.BasicSourceMapConsumer (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/node_modules/source-map/lib/source-map/source-map-consumer.js:287:23)
    at new SourceMapConsumer (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/node_modules/source-map/lib/source-map/source-map-consumer.js:25:9)
    at File.mergeSourceMap (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/lib/babel/transformation/file/index.js:500:31)
    at File.generate (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/lib/babel/transformation/file/index.js:732:25)
    at File.transform (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/lib/babel/transformation/file/index.js:594:17)
    at /Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/lib/babel/transformation/transformer-pipeline.js:100:19
    at File.wrap (/Users/grigio/+persistant/Code/testing/rails-react-webpack/node_modules/babel-core/lib/babel/transformation/file/index.js:604:16)
 @ multi main
[11:50:27] Finished 'javascript:dev' after 2.62 s
hung-phan commented 9 years ago

That one is a little bit old. Let me get the new generated code for you.

hung-phan commented 9 years ago

@grigio You can checkout the updated repo rails-react-webpack now. Feel free to reopen the issue if you get that error again

grigio commented 9 years ago

Now it works fine, thanks