Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running serve twice without code changes breaks any of the typescript templates. #743

Closed
kumorig opened this issue Jan 29, 2018 · 5 comments

Comments

@kumorig
Copy link

kumorig commented Jan 29, 2018

Version

3.0.0-alpha.4

Reproduction link

http://I-do-not-have-a-link

Steps to reproduce

  1. Run vue create project, any settings that includes typescript will do.

  2. "cd project" and npm run serve It compiles and runs without errors.

  3. Stop the process (ctrl-break) and run once more: npm run serve.

What is expected?

It's expected to compile and run again without errors.

What is actually happening?

It throws an error:
Module build failed: Error: Could not find file: '/var/www/test/src/App.vue'. at getValidSourceFile (/var/www/test/node_modules/typescript/lib/typescript.js:95642:23) at Object.getEmitOutput (/var/www/test/node_modules/typescript/lib/typescript.js:96002:30) at Object.getEmitOutput (/var/www/test/node_modules/ts-loader/dist/instances.js:155:41) at getEmit (/var/www/test/node_modules/ts-loader/dist/index.js:172:35) at successLoader (/var/www/test/node_modules/ts-loader/dist/index.js:42:11) at Object.loader (/var/www/test/node_modules/ts-loader/dist/index.js:29:12)


I assume this is a cache-issue, since making any script changes and running again fixes the problem temporarily. I've tried all combinations of babel polyfills on/off and class style decorators on/off, on win10 and centos 7, giving the same results.

@buzzzzer
Copy link

buzzzzer commented Jan 29, 2018

the same issue.
3.0.0-alpha.4 on windows 10,

It helps only to clear ../node_modules/.cache before each run serve command

@ravjsdev
Copy link

I get the same issue after executing command npm run serve for the second time - the initial run works fine

the error i get states:

 error  in ./src/views/Home.vue

Module build failed: Error: Could not find file: '******* /Documents/vuetest/src/views/Home.vue'.

After clearing cache as per @buzzzzer's comment I am then able to execute npm run serve command successfully.

@yyx990803
Copy link
Member

Thanks, this is known and fixed in dev branch, alpha.5 will be out today.

@ravjsdev
Copy link

@yyx990803 this issue still occurs and i'm using alpha.5 - the only difference now is it doesn't occur on the 2nd time npm run serve is executed - it seems to randomly occur - i think maybe i ran npm run serve a few times and now get Error: Could not find file: '/Users/*****/Documents/trak/src/views/Home.vue' - deleting the .cache folder resolves the issue temporarily until it happens again.

@yyx990803
Copy link
Member

@ravjsdev yeah, I've noticed that yesterday as well, but it should be fixed for real in the next release ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants