I have a Rails 5.1 app (migrated from Rails 4.1) and now I'm configuring webpacker + vue.
I've added gem 'webpacker' to Gemfile and ran rake webpacker:install. All dependencies where successfully installed, but I'm unable to run rake webpacker:compile.
I have already removed all dependencies and tried to compile just with webpacker dependencies with no success. I also tried to remove yarn-offline-mirror config. webpacker.yml is the default one generated by rake task.
Output from rake webpacker:compile
$ rake webpacker:compile
Webpacker is installed 🎉 🍰
Using /app/config/webpacker.yml file for setting up webpack paths
Compiling…
Compilation failed:
module.js:557
throw err;
^
Error: Cannot find module './vendor/parse'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/node_modules/parse-json/index.js:3:16)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
yarn-offline-mirror "./vendor/yarn"
yarn-offline-mirror-pruning true
Scenario
I have a Rails
5.1
app (migrated from Rails4.1
) and now I'm configuringwebpacker
+vue
.I've added
gem 'webpacker'
toGemfile
and ranrake webpacker:install
. All dependencies where successfully installed, but I'm unable to runrake webpacker:compile
.I have already removed all dependencies and tried to compile just with
webpacker
dependencies with no success. I also tried to removeyarn-offline-mirror
config.webpacker.yml
is the default one generated byrake
task.Output from
rake webpacker:compile
Relevant gems
env
.yarnrc
package.json
webpacker.yml