vue-cli npm run serve hits error "cache-loader --> failed to compile ---> this relative module was not found"

Created on 5 Jan 2019  路  6Comments  路  Source: vuejs/vue-cli

Version

3.2.3

Reproduction link

https://new-issue.vuejs.org/?repo=vuejs/vue-cli

Environment info

Usage: vue <command> [options]

Options:
  -V, --version                              output the version number
  -h, --help                                 output usage information

Commands:
  create [options] <app-name>                create a new project powered by vue-cli-service
  add [options] <plugin> [pluginOptions]     install a plugin and invoke its generator in an already created project
  invoke [options] <plugin> [pluginOptions]  invoke the generator of a plugin in an already created project
  inspect [options] [paths...]               inspect the webpack config in a project with vue-cli-service
  serve [options] [entry]                    serve a .js or .vue file in development mode with zero config
  build [options] [entry]                    build a .js or .vue file in production mode with zero config
  ui [options]                               start and open the vue-cli ui
  init [options] <template> <app-name>       generate a project from a remote template (legacy API, requires @vue/cli-init)
  config [options] [value]                   inspect and modify the config
  upgrade [semverLevel]                      upgrade vue cli service / plugins (default semverLevel: minor)

  Run vue <command> --help for detailed usage of given command.


Steps to reproduce

vue create my-app
delete ../assets/logo.svg

What is expected?

hot reloading

What is actually happening?

looking for removed files in cache and idk what to do to clear it / reset it (not browser cache)


  • ../assets/logo.svg in ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6baa54c6-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vuetify-loader/lib/loader.js!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=template&id=469af010&
needs reproduction

Most helpful comment

What I did was the following:

vue add vuetify

remove all references to HelloWorld.vue from App.vue

deleted the component and the logo.svg _while_ npm run serve was going.

I have experienced this error as well if I rename and move a component (e.g. move into a sub directory).

All 6 comments

The image is still referred to in HelloWorld.vue

If you remove the reference i that component's template, all is working fine.

So this is expected behaviour

@linusborg there is no helloworld component anymore.

You didn't mention that.

If you can provide an actually complete reproduction i can consider to reopen

What I did was the following:

vue add vuetify

remove all references to HelloWorld.vue from App.vue

deleted the component and the logo.svg _while_ npm run serve was going.

I have experienced this error as well if I rename and move a component (e.g. move into a sub directory).

can you replicate it without adding any plugins?

I'm also not sure if this is not simply webpack's behaviour or really a caching problem on our side.

Closing for inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OmgImAlexis picture OmgImAlexis  路  3Comments

jgribonvald picture jgribonvald  路  3Comments

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments

CodeApePro picture CodeApePro  路  3Comments

csakis picture csakis  路  3Comments