rails初心者です。
以下のサイトを参考に、rails上でVueの環境構築を行っていました。
Vue.jsとRailsでTODOアプリのチュートリアルみたいなものを作ってみた【2018.03.24】
が、rails s
を実行し、http://domain
に接続したところ、以下のようなエラーがでて、きちんと処理ができていないようでした
ERROR in ./app/javascript/packs/application.js Module build failed: ReferenceError: Unknown plugin "@babel/plugin-syntax-dynamic-import" specified in "/home/web/rails/プロジェクト名/.babelrc" at 0, attempted to resolve relative to "/home/web/rails/プロジェクト名" at /home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17 at Array.map (native) at Function.normalisePlugins (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at OptionManager.init (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) at File.initOptions (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/index.js:212:65) at new File (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/index.js:135:24) at Pipeline.transform (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/home/web/rails/プロジェクト名/node_modules/babel-loader/lib/index.js:50:20) at /home/web/rails/プロジェクト名/node_modules/babel-loader/lib/fs-cache.js:118:18 at ReadFileContext.callback (/home/web/rails/プロジェクト名/node_modules/babel-loader/lib/fs-cache.js:31:21) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:367:13) ERROR in ./app/javascript/packs/hello_vue.js Module build failed: ReferenceError: Unknown plugin "@babel/plugin-syntax-dynamic-import" specified in "/home/web/rails/プロジェクト名/.babelrc" at 0, attempted to resolve relative to "/home/web/rails/プロジェクト名" at /home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17 at Array.map (native) at Function.normalisePlugins (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at OptionManager.init (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) at File.initOptions (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/index.js:212:65) at new File (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/file/index.js:135:24) at Pipeline.transform (/home/web/rails/プロジェクト名/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/home/web/rails/プロジェクト名/node_modules/babel-loader/lib/index.js:50:20) at /home/web/rails/プロジェクト名/node_modules/babel-loader/lib/fs-cache.js:118:18 at ReadFileContext.callback (/home/web/rails/プロジェクト名/node_modules/babel-loader/lib/fs-cache.js:31:21) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:367:13) Rendered page/home.html.erb within layouts/application (2348.8ms) Completed 200 OK in 3300ms (Views: 3292.3ms | ActiveRecord: 0.0ms)
素人なりに、.babelrc
が原因かと思い見てみたのですが、内容がよくわかりませんでした…
もし原因等こころあたりある方がいれば教えていただきたいです。
また、versionなど、必要な情報があれば指摘してください。
よろしくお願いいたします!
あなたの回答
tips
プレビュー