私はlaravel 5.4を使用しています。エスキシックをセットアップしてsassファイルをコンパイルしたかったのです。私は$ npm install
を実行して、万能薬をインストールしようとし、その後、私は$ gulp
を実行しようとしたが、それは私に次のエラーました:const elixir = require('laravel-elixir');
を追加した後エリクシールが定義されていないエラー
/home/vagrant/Code/Laravel/gulpfile.js:1
(function (exports, require, module, __filename, __dirname) { elixir(mix => {
^
ReferenceError: elixir is not defined
at Object.<anonymous> (/home/vagrant/Code/Laravel/gulpfile.js:1:63)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at execute (/usr/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js:24:18)
at Liftoff.handleArguments (/usr/lib/node_modules/gulp-cli/index.js:149:63)
を、私はこのエラーを取得しています:
[02:28:30] Starting 'webpack'...
{ [Error: ./resources/assets/js/components/Example.vue
Module parse failed: /home/vagrant/Code/Laravel/resources/assets/js/components/Example.vue Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| <template>
| <div class="container">
| <div class="row">
@ ./resources/assets/js/app.js 16:25-60]
message: './resources/assets/js/components/Example.vue\nModule parse failed: /home/vagrant/Code/Laravel/resources/assets/js/components/Example.vue Unexpected token (1:0)\nYou may need an appropriate loader to handle this file type.\n| <template>\n| <div class="container">\n| <div class="row">\n @ ./resources/assets/js/app.js 16:25-60',
showStack: false,
showProperties: true,
plugin: 'webpack-stream',
__safety: { toString: [Function: bound ] } }
: 'のconst {エリクシル} =必要( 'laravel-エリキシルあなたは下のサンプルを参照してください
require('laravel-elixir-vue-2');
必要とする必要があります'); ' – PaladiNどのファイルですか? @PaladiN – ottsharp13
'Webpack.mix.js'から上記のインポートを使用していて、' gulpfile.js'を使用している場合(あなたが使用しているように) 'const elixir = require( 'laravel-elixir' ); ' – PaladiN