Search code examples
node.jsnpmnuxt.jsfeathersjsnpm-start

Npm start deletes new files from .nuxt


Whenever I run "npm start" it always deletes, and even "reset" files, that I add in my .nuxt folder. As in, when I add, as an example, a new component in the .nuxt > "components" folder, press CTRL + C in cmd to stop the server and then restart running "npm start", it always "resets" the .nuxt folder to its initial/install state. Why is this happening?
I am using "FeathersJS" for backend and "NuxtJS" for frontend.

package.json:

"scripts": {
"test": "npm run eslint && npm run mocha",
"eslint": "eslint src/. test/. --config .eslintrc.js",
"build": "nuxt build",
"dev": "SET DEBUG=nuxt:* && nodemon --watch src/ --watch config/ src/index.js",
"prestart": "npm run build",
"start": "SET NODE_ENV=production && nodemon src/",
"mocha": "mocha test/ --recursive"
},

Solution

  • I have found my own solution now. The solution can be found here, for future reference: https://github.com/fexell/FeathersJS-NuxtJS