I'm trying to set up a repeatable build-environment which does not mess with anything on the local machine. For that I decided to use docker to wrap the npm and vue cli. Everything runs on the machine where I first ran the vue quickstart command.
But when I take a fresh clone from the repository on another machine, I get the following error after running the setup process:
$ ./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
It says that details are in /data/npm-debug.log but I can't see that file either. So both the build folder and npm-debug.log seem to never appear on the mounted volume. I guess something with my docker setup is not quite right. But I don't know what.
To reproduce the following error run the following:
NOTE You need to hav "fabric" installed for the 4th step. If you don't have it, look at the contents of fabfile.py, it's really easy to understand and run the tasks manually.
NOTE2 If you don't have python 3 with "pyvenv", the fab develop task will fail on the last step of the develop task. You can ignore this for this docker/npm issue as the Python portion is not needed.
git clone https://github.com/exhuma/powonline
cd powonline
git checkout stackoverflow-2017-06-17
fab develop
cd frontend
./npm run dev