Laravel 5.3-Fehler beim Ausführen des gulp-Befehls
阿神
阿神 2017-05-16 16:51:41
0
2
286

Beim Ausführen des gulp-Befehls in Laravel 5.3 tritt der folgende Fehler auf:

D:\wnmp\www\laravel-5-3-demo>gulp
(node:12992) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[02:47:21] Using gulpfile D:\wnmp\www\laravel-5-3-demo\gulpfile.js
[02:47:21] Starting 'all'...
[02:47:21] Starting 'sass'...
[02:47:21] Finished 'sass' after 375 ms
[02:47:21] Starting 'webpack'...
{ [Error: ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/Example.vue
Module build failed: Error: Cannot remove "babel-plugin-transform-es2015-modules-commonjs" from the plugin list.
    at Object.<anonymous> (D:\wnmp\www\laravel-5-3-demo\node_modules\babel-preset-es2015-webpack\index.js:35:11)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at D:\wnmp\www\laravel-5-3-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:324:15
    at Array.map (native)
 @ ./resources/assets/js/components/Example.vue 2:17-130
 @ ./resources/assets/js/app.js]
  message: './~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/Example.vue\nModule build failed: Error: Cannot remove "babel-plugin-transform-es2015-modules-commonjs" from the plugin list.\n    at Object.<anonymous> (D:\wnmp\www\laravel-5-3-demo\node_modules\babel-preset-es2015-webpack\index.js:35:11)\n    at Module._compile (module.js:541:32)\n    at Object.Module._extensions..js (module.js:550:10)\n    at Module.load (module.js:458:32)\n    at tryModuleLoad (module.js:417:12)\n    at Function.Module._load (module.js:409:3)\n    at Module.require (module.js:468:17)\n    at require (internal/module.js:20:19)\n    at D:\wnmp\www\laravel-5-3-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:324:15\n    at Array.map (native)\n @ ./resources/assets/js/components/Example.vue 2:17-130\n @ ./resources/assets/js/app.js',
  showStack: false,
  showProperties: true,
  plugin: 'webpack-stream',
  __safety: { toString: [Function: bound ] } }

Laut diesem Beitrag, https://github.com/gajus/babe...
Es gibt zwei Lösungen:
1.

npm i -D -E babel-preset-es2015@6.9.0

2.

// .babelrc
{
  "presets": [
    ["es2015", {"modules": false}]
  ]
}

Ich möchte die zweite Methode verwenden, aber es gibt zwei Fragen:
1. Wo soll die Datei abgelegt werden? .babelrc2. Muss ich etwas löschen und dann neu installieren?

阿神
阿神

闭关修行中......

Antworte allen(2)
大家讲道理

帖子上说手动删除node_modules文件夹然后再运行 npm i

迷茫

直接注释箭头所指的 就可以gulp了

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!