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

[4.0.6] using webpack-dev-server in fresh rails app results in Uncaught TypeError #2114

Open
lastobelus opened this issue Jun 1, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@lastobelus
Copy link

commented Jun 1, 2019

The full error trace is:

decode.js:32 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Module.<anonymous> (decode.js:32)
    at Module../node_modules/querystring-es3/decode.js (decode.js:88)
    at __webpack_require__ (bootstrap:19)
    at Object../node_modules/querystring-es3/index.js (index.js:3)
    at __webpack_require__ (bootstrap:19)
    at Object.<anonymous> (client:6)
    at Object../node_modules/webpack-dev-server/client/index.js?http://localhost:3035 (client:337)
    at __webpack_require__ (bootstrap:19)
    at Object.0 (log.js:47)
    at __webpack_require__ (bootstrap:19)

Steps to reproduce:

  rails new test2 --webpack
  cd test2
  rails g controller pages home
  ./bin/webpack-dev-server
  rails s
  # navigate to localhost:3000/pages/home

There is no error if you just run rails s and rely on webpack compile on demand.

@lastobelus

This comment has been minimized.

Copy link
Author

commented Jun 1, 2019

...the earlier workaround ( add environment.loaders.delete('nodeModules') to environment.js ) makes webpack-dev-server work again

@jakeNiemiec

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

Please tell me if #2109 (comment) helps at all.

@jakeNiemiec

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Was this issue resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.