2017-08-21 26 views
2

Ich habe Probleme beim Installieren von Webpack auf Ubuntu und Debian bekommen Ich bekomme immer den folgenden Fehler, wenn ich eine "npm install -g webpack " mache. Ich habe ein Update und ein Upgrade gemacht, ich habe Betriebssysteme zwischen Debian und jetzt auf Ubuntu getauscht. Jetzt ziemlich verwirrt.Webpack installation [email protected] gesucht

WARN engine [email protected]: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current:        {"node":"4.2.6","npm":"3.5.2"}) 
    WARN engine [email protected]: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current:        loadDep:yargs → headers ▐ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ 
    WARN engine [email protected]: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (cu        loadDep:yargs → resolveWi ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ 
    WARN engine [email protected]: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"}        (current: {"node":"4.2.6","npm":"3.5.2"}) 
    WARN engine [email protected]: wanted: {"node":">=4.3.0 <5.0.0 || >=        /usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js 

> [email protected] postinstall /usr/local/lib/node_modules/webpack/        node_modules/uglifyjs-webpack-plugin 
> node lib/post_install.js 

sh: 1: node: not found 
/usr/local/lib 
└── (empty) 

npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents        : 
npm WARN notsup Not compatible with your operating system or architecture: fseve        [email protected] 
npm ERR! Linux 2.6.32-042stab123.9 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "webpack" 
npm ERR! node v4.2.6 
npm ERR! npm v3.5.2 
npm ERR! file sh 
npm ERR! code ELIFECYCLE 
npm ERR! errno ENOENT 
npm ERR! syscall spawn 

npm ERR! [email protected] postinstall: `node lib/post_install.js` 
npm ERR! spawn ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node li        b/post_install.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the uglifyjs- webpack-plug        in package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node lib/post_install.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs uglifyjs-webpack-plugin 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls uglifyjs-webpack-plugin 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /root/npm-debug.log 
npm ERR! code 1 

Antwort

2

Sie verwenden die Knotenversion 4.2.6, die unter 4.3 ist. Webpack benötigt Version des Knotens über 4.3

Aktualisieren Sie Ihre Knotenversion, wenn möglich.

$ sudo apt-get install curl 
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash – 
$ sudo apt-get install -y nodejs 

oder n Bibliothek von NPM verwenden.

+0

Ah okay danke werde dies versuchen. Vielen Dank – BKCapri

Verwandte Themen