Monday 5 June 2017

Can not restart webpack 2 dev server after stopping it

I have a project started with vue-cli webpack-simple. I do some work and then I need to edit .babelrc, so I stop the dev-server, do my stuff (installing babel-preset-stage-2), and suddenly it wont start.


I get the following error:

> simple_vuex@1.0.0 dev /Users/michaelks/Dropbox/02 Projects/02 simple_vue
> cross-env NODE_ENV=development webpack-dev-server --open --hot

module.js:472
    throw err;
    ^

Error: Cannot find module '../'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/michaelks/Dropbox/02 Projects/02 simple_vue/node_modules/.bin/cross-env:4:9)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! simple_vuex@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the simple_vuex@1.0.0 dev script 'cross-env NODE_ENV=development webpack-dev-server --open --hot'.
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 simple_vuex package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development webpack-dev-server --open --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs simple_vuex
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls simple_vuex
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/michaelks/.npm/_logs/2017-06-05T23_08_54_389Z-debug.log


I've tried:
npm uninstall and the install.
changed the name of the folder and then back again.
restarting the computer

It works if create a new vue project and just copy over my src folder, but I find it quite demoralizing in the long run.

I'm storing my projects on dropbox. Is this an issue?



via Michael

No comments:

Post a Comment