Module build failed with .vue.erb files
See original GitHub issueNot sure where the following error came from as I was deploying regularly and then nope…
This error only seems to occur with .vue.erb files. It appears to be an issue with the erb loader though as that seems to be the point where the compilation fails.
My package.json
{
"dependencies": {
"@rails/webpacker": "^3.2.2",
"caniuse-lite": "^1.0.30000697",
"css-loader": "^0.28.10",
"rails-erb-loader": "^5.2.1",
"vue": "^2.5.13",
"vue-loader": "^14.1.1",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.10.0",
"webpack-merge": "^4.1.0"
},
"devDependencies": {
"webpack-dev-server": "^2.11.1"
}
}
And the error which only occurs for two (I only have two) of my .vue.erb files.
ERROR in ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-62bbf8aa","scoped":true,"sourceMap":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/rails-erb-loader??ref--5-0!./app/javascript/packs/public/sections.vue.erb
Module build failed: Error: Command failed: bin/rails runner /home/deploy/myapp/tmp/build-152020830820117/node_modules/rails-erb-loader/erb_transformer.rb __RAILS_ERB_LOADER_DELIMETER__ erb 0
at ChildProcess.exithandler (child_process.js:199:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket.<anonymous> (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:509:12)
@ ./node_modules/extract-text-webpack-plugin/dist/loader.js?{"omit":1,"remove":true}!./node_modules/vue-style-loader!./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-62bbf8aa","scoped":true,"sourceMap":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/rails-erb-loader??ref--5-0!./app/javascript/packs/public/sections.vue.erb 4:14-425
@ ./app/javascript/packs/public/sections.vue.erb
I’ve researched and looked for possible reasons for the failure for hours and nothing resolves the issue. I don’t understand the error message, so I’m at a loss on what exactly the issue might be.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
trouble with erb-loader, is not working with .vue.erb files
im working with vue and everything going great, but at the moment to compile with erb, the console shows me a error: ERROR...
Read more >Vue.js Components in Rails Views Discussion - GoRails
Hey Chris How would you go about showing images uploaded via ActiveStorage on your vue components? In ERB the image tag magically renders...
Read more >Vue3 on Rails - DEV Community
Install Vue3 & Co. Configure Webpack environment. Set an alias; Vue Loader; Include .vue files; Set Vue properties. Create Vue app. Create entry ......
Read more >SylarRuby - Hotwire Discussion
Uncaught Error : Module build failed (from ./node_modules/rails-erb-loader/index.js): Error: rails-erb-loader failed with code: 1.
Read more >Rails, Webpacker, and Vue CLI Can Actually Play Nicely
(Updated again 09/07/21 to fix hot module replacement or live reload, ... We use the various configurations from that file to build our...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rhys-vdw Sorry, I meant rails-erb-loader.
Thanks for the update @akaspick.
What is erb-helper?