Webpacker error from Vue.js Trello Clone Series
Hey all, I have an error that I just can't get to the bottom of. While going through the awesome Vue.js Trello Clone tutorial I started seeing this:
I've tried adding the application.css file, setting the compile config values in webpacker.yml, recompiling webpacker to force the path changes, clearing the assets using:
rails tmp:clear assets:clobber
I've downgraded the webpack-dev-server as per this issue https://github.com/rails/webpacker/issues/1303
I've also tried pulling down the final version of the clone from Github and running it in a Docker container and still actually get the same issue. I'm sure it's something small on the config side that I'm doing incorrectly. I'm working on a Mac running High Sierra (10.13.3). Any guidance is much appreciated, thanks!
You can get that error if you made a typo because it can't compile the file. Try checking your code for errors.
Couldn't spot any typos so I rolled back to the second commit (where I am in the tutorial) on master and now it's working which rules out a config err. I'm sure you're right and it was a little typo. Just needed some fresh eyes. Thanks for responding so fast Chris! GoRails is a fantastic resource and I'm already learning Rails rapidly thanks to you.
I get a similar error with my own Rails 5.2/VueJS application when deploying to heroku. The application runs fine without errors locally, so I don't think a typo in my JS code could be the reason. The manifest.json file is created fine, but other than that, my public/packs folder remains empty. Any hints as to in which file I made have a typo to cause this error?
Ok, my mistake was, that I used webpack version 4, which is not compatible with the latest release of the webpacker gem. Downgrading webpack to version 3 solved the problem – now assets are compiled.