Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

unexpected token at 'Cannot GET /webpack/manifest.json #58

Closed
hazardco opened this issue Sep 18, 2016 · 4 comments
Closed

unexpected token at 'Cannot GET /webpack/manifest.json #58

hazardco opened this issue Sep 18, 2016 · 4 comments

Comments

@hazardco
Copy link

Hello,

I have a problem with this gem. I have created a simple project to test webpack-rails with a controller and a unique view. When i execute foreman start I get the following error: "unexpected token at 'Cannot GET /webpack/manifest.json"

I have:

  • Ruby 2.3.0
  • Rails 5.0
  • Node 6.6.0

I followed the installation instructions:

-Add webpack-rails to your gemfile
-Run bundle install to install the gem
-Run bundle exec rails generate webpack_rails:install to copy across example files
-Run foreman start to start webpack-dev-server and rails server at the same time
-Add the webpack entry point to your layout (see next section)
-Edit webpack/application.js and write some code

I have added "<%= javascript_include_tag *webpack_asset_paths("application") %>" to the layout.html.erb

¿Any solution?

Thanks!!

@mipearson
Copy link
Owner

A very recent new version of a dependency of webpack or webpack-dev-server is breaking manifest generation. I'm looking into this now.

@mipearson
Copy link
Owner

Workaround: add:

    "webpack-dev-middleware": "1.7.0"

to your package.json, run npm install && npm dedup

There seems to be an issue with stats-webpack-plugin & the latest version of webpack-dev-middleware.

@juanca
Copy link

juanca commented Sep 20, 2016

Fixed in latest, see webpack/webpack-dev-middleware#129

@wemmick
Copy link

wemmick commented Jan 24, 2017

I just installed this gem and am getting the same error:

784: unexpected token at 'Cannot GET /webpack/manifest.json
'

I'm on Rails 4.2.4, Ruby 2.2.2p95, Node 4.1.1

I tried adding the webpack-dev-middleware to my package.json dependencies, but am still getting the error. Any ideas? Or do you need more info from me?

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

No branches or pull requests

4 participants