1
votes

Brand new installation, installed Vue via vue cli. Run vue create app and set up with basic configuration. Delete HelloWorld.vue component and the accompanying import code from Home.vue. Run npm run serve and am immediately met with

This dependency was not found:

@/components/HelloWorld.vue in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Home.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save @/components/HelloWorld.vue

I have tried uninstalling and reinstalling Vue, updating all dependencies, everything I can think of. Did a global search for "helloworld" and there is no trace of it.

Everything works fine on my Mac. Any help would be great.

2
delete your node_module directory and re-install all dependeciesdsfx3d

2 Answers

0
votes

Go to your Home.vue file located in the views folder and completely remove the HelloWorld.vue component.

0
votes

I had the same Issue. New Vue Project from VueCLI... Using Visual Studio code. Latest of Yarn (not NPM), latest VS Code. Node. Vue 3 preview.

Had me baffled for a few minutes. Even after I delete the node_modules it still didn't work.

I think this may be a different reason than your issue, but maybe this might save someone else a few minutes...

So.. What fixed it for me? Its going to sound stupid... but here it goes anyway!:

I was using Visual Studio Code and I didn't have AutoSave on, so after I explicitly saved my renamed HelloWorld.vue file and saved all the dependences like App.vue files etc. I yarn installed and run again, and it worked.. oh boy... duh! (Face-Palm moment)