0
votes

So I installed vue cli 4.1.1 to get a new project going. I select manual setup so I can pick what I need. But when I try to run "npm run serve" I get the following error:

ERROR Failed to compile with 4 errors 10:59:53 These dependencies were not found: * @/components/HelloWorld.vue in C:/Program Files/nodejs/node_modules/@vue/cli-service-global/node_modules/babel-loader/lib??ref--12-0!C:/Program Files/nodejs/node_modules/@vue/cli-service-global/node_modules/cache-loader/dist/cjs.js??ref--0-0!C:/Program Files/nodejs/node_modules/@vue/cli-service-global/node_modules/vue-loader/lib??vue-loader-options!./views/Home.vue?vue&type=script&lang=js& * register-service-worker in ./registerServiceWorker.js * vue-router in ./router/index.js * vuex in ./store/index.js To install them, you can run: npm install --save @/components/HelloWorld.vue register-service-worker vue-router vuex

All the files are at the right place. I havn't done anything to the project besides removing node_modules and reinstalling it with "npm install". (Had to do this to get rid of another error)

I am runnig Windows 10, Node 10.15.1, NPM 5.0.4 and vue-cli 4.1.1

What troubles me the most is that it's just regular vue files and not packages. Why it suggests that I should install them with npm install is something I find odd.

2

2 Answers

1
votes

As you chose manual option you have to create a file in components directory name as HelloWorld.vue After the above step run npm install --save register-service-worker vue-router vuex

-2
votes

Have you run this command as described.

npm install --save @/components/HelloWorld.vue register-service-worker vue-router vuex