webentwicklung-frage-antwort-db.com.de

Fehler beim Laden des externen Moduls @ babel/register während des Zugriffs

In meinem Reaktionsprojekt funktioniert alles gut auf meiner VMware. Wenn ich jedoch dieselbe App geklont und einen gulp-Befehl ausgeführt habe, erhalte ich diesen Fehler während des Kompilierens 

   MacBook-Pro:Frontend1.0 apurvgandhwani$ gulp
[18:42:31] Failed to load external module @babel/register
[18:42:31] Requiring external module babel-register
[18:42:32] Using gulpfile ~/Frontend1.0/gulpfile.babel.js
[18:42:32] Starting 'build:watch'...
[18:42:32] Starting 'copy:assets'...
[18:42:32] Starting 'copy:vendors'...
  Cleaned build/ 
  Copied 12 asset entries.
[18:42:32] Finished 'copy:vendors' after 329 ms
[18:42:32] Starting 'copy:views'...
[18:42:32] copied views all files 19.75 kB
[18:42:32] Finished 'copy:views' after 77 ms
[18:42:32] Starting 'copy:public'...
[18:42:33] Finished 'copy:public' after 132 ms
[18:42:33] Finished 'copy:assets' after 540 ms
[18:42:33] Starting 'bundle:dll'...
DLL Bundled.
Hash: 45f26d608c690be6e6c5
Version: webpack 1.15.0
Time: 2181ms
        Asset     Size  Chunks             Chunk Names
dll.vendor.js  3.11 MB       0  [emitted]  vendor
[18:42:35] Finished 'bundle:dll' after 2.21 s
[18:42:35] Starting 'bundle'...
Hash: 7457a3cd38cf5c991640
Version: webpack 1.15.0
Time: 508ms
           Asset     Size  Chunks             Chunk Names
server-bundle.js  37.3 kB       0  [emitted]  main
  -- server:watch bundled.
Hash: e4a95c52aac91b47f75c
Version: webpack 1.15.0
Time: 46339ms
         Asset     Size  Chunks             Chunk Names
main-bundle.js  20.1 MB       0  [emitted]  main
  -- client bundled.
[18:43:21] Finished 'bundle' after 46 s
[18:43:21] Starting 'start:server'...
Starting Node Server...
[18:43:21] Finished 'start:server' after 68 ms
[18:43:21] Starting 'watch:sync'...
[18:43:21] [nodemon] 1.11.0
[18:43:21] [nodemon] to restart at any time, enter `rs`
[18:43:21] [nodemon] watching: build/server-bundle.js
[18:43:21] [nodemon] starting `node --debug build/server-bundle.js`
Server Restarted: Reloading BrowserSync.
(node:6700) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[18:43:21] [nodemon] app crashed - waiting for file changes before starting...
[tessact: ] Proxying: http://localhost:4200
[tessact: ] Access URLs:
 -------------------------------------
       Local: http://localhost:3001
    External: http://192.168.0.32:3001
 -------------------------------------
          UI: http://localhost:3002
 UI External: http://192.168.0.32:3002
 -------------------------------------
[tessact: ] Watching files...
[18:43:21] Finished 'watch:sync' after 262 ms
[18:43:21] Starting 'watch:assets'...
[18:43:22] Finished 'watch:assets' after 110 ms
[18:43:22] Finished 'build:watch' after 50 s
[18:43:22] Starting 'default'...
[18:43:22] Finished 'default' after 37 μs
webpack built e4a95c52aac91b47f75c in 26323ms
Hash: e4a95c52aac91b47f75c
Version: webpack 1.15.0
Time: 26323ms
         Asset     Size  Chunks       Chunk Names
main-bundle.js  20.1 MB       0       main
webpack: Compiled successfully.
[18:50:28] [nodemon] restarting due to changes...
[18:50:28] [nodemon] starting `node --debug build/server-bundle.js`
Server Restarted: Reloading BrowserSync.
[tessact: ] Reloading Browsers...
(node:6705) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[18:50:28] [nodemon] app crashed - waiting for file changes before starting...
Abort trap: 6

Dies ist mein package.json-Snippet

 "dependencies": {
    "@trendmicro/react-toggle-switch": "^0.5.5",
    "animate.css": "^3.5.1",
    "axis": "^0.6.1",
    "babel-core": "^6.10.4",
    "babel-loader": "^6.2.4",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-react": "^6.11.1",
    "babel-preset-react-hmre": "^1.1.1",

Ich habe viele Threads verfolgt, aber nichts scheint meinen Fall zu lösen. Was soll ich tun, um das zu lösen? Ich habe bereits Babel-Core anstelle von Babel in meinem package.json, was die meisten Lösungen nahe legen. 

4
ApurvG

Ich habe es gelöst, indem ich die gulp Version von 3.9.1 auf 3.9.0 heruntergestuft habe. Sieht aus, als wäre 3.9.1 fehlerhaft. 

2
ApurvG

Dies ist nur eine Warnung, dass Gulp @babel/register nicht laden konnte, aber in der nächsten Zeile wurde das Fallback-Modul erfolgreich geladen: babel-register

https://github.com/gulpjs/gulp/issues/1631

Sie können das Modul babel-core/register installieren, um die Warnung zu entfernen. Dies ist jedoch nicht erforderlich.

1
Toma Nistor