Ich versuche, eine wiederholbare Build-Umgebung, die nicht mit irgendetwas auf dem lokalen Rechner zu stören. Dafür entschied ich mich, docker zu verwenden, um die npm
und vue
cli zu wickeln. Alles läuft auf der Maschine, auf der ich zuerst den Befehl vue quickstart ausgeführt habe.vuejs Anwendung läuft nicht mit dockerized npm
Aber wenn ich einen neuen Klon aus dem Repository auf einem anderen Rechner übernehmen, ich die folgende Fehlermeldung erhalten, nachdem den Setup-Prozess ausgeführt wird:
$ ./npm run dev
> [email protected] dev /data
> node build/dev-server.js
module.js:472
throw err;
^
Error: Cannot find module '/data/build/dev-server.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:148:9)
at bootstrap_node.js:542:3
npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v7.7.4
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'node build/dev-server.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 my-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-project
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-project
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /data/npm-debug.log
Er sagt, dass Details in /data/npm-debug.log
sind, aber ich kann nicht sehen, dass Datei entweder. So scheinen sowohl der Ordner build
als auch npm-debug.log
niemals auf dem gemounteten Volume zu erscheinen. Ich denke, etwas mit meinem Docker Setup ist nicht ganz richtig. Aber ich weiß nicht was.
die folgenden Fehler führen die folgenden zu reproduzieren:
HINWEIS Sie benötigen „Stoff“ für den 4. Schritt installiert hav. Wenn Sie es nicht haben, sehen Sie sich den Inhalt von fabfile.py
an, es ist wirklich einfach zu verstehen und führt die Aufgaben manuell aus.
NOTE2 Wenn Sie nicht Python 3 mit „pyvenv“ haben, wird die fab develop
Aufgabe auf dem letzten Schritt der develop
Aufgabe scheitern. Sie können dies für dieses docker/npm-Problem ignorieren, da der Python-Teil nicht benötigt wird.
git clone https://github.com/exhuma/powonline
cd powonline
git checkout stackoverflow-2017-06-17
fab develop
cd frontend
./npm run dev