-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
No eslint warnings on initial "npm run serve" #3065
Comments
Noticing this as well plus an extra case:
|
I am noticing the exact same problem as @joshuathompson running However, this happens only when I run our entire codebase. I cannot reproduce it in an "empty" (freshly
This makes sence, since the errors in the first run are mainly problems where eslint thinks that components/variables are registered but not used. On the second run this info is in the cache. Finally: A |
@tmerten Thanks for the clue, you are right it have something to do with the cache . In more detail, we are using I have tried to think about it but didn't come up with a solution.😅 |
@jkzing Thanks for the heads up. Would you happen to have an idea how to run the Just to give some context info why I am struggling with this: We are developing in docker containers and in there, the cache is never generated ( |
@tmerten Hmm...I might not fully understand your scenario. When using a docker for development, if every time you start up with a fresh container, it should not have the cache problem above I mentioned. Actually I have tested it with a simple dockerfile: FROM node:latest
RUN mkdir -p /test-lint
WORKDIR /test-lint
COPY package.json /test-lint/package.json
RUN npm i
COPY . /test-lint
EXPOSE 3000
CMD ["npm", "run", "serve"]
I guess maybe you don't want to see any eslint errors on first build with If that is your case, you can select |
Err. Sorry for the confusion. I happen to have a different problem than the original one, which seems to be related (maybe the issue can be split in two, actually). It was described originally in the comment by @joshuathompson above. To summarize: I see "random" errors (mainly things like @jkzing I can open fresh issue for that if it is not related. |
I also encountered this problem. When first run |
any update on this? I want |
As a workaround could you just make a new script ~ "npm run lint --no-fix && npm run serve" |
I have this issue, where when pulling a branch. I would get linter errors on serve |
I used a similar trick to #3065 (comment) but, in my case at least, I only needed to clear the
I do:
|
from @progsri here |
it works ! |
1 similar comment
it works ! |
Removing the vue-loader cache don't work for me... |
For our project, you have to remove the entire /.cache/ folder and not just /.cache/vue-loader for this to work reliably. |
Working, but removing the cache is just a temporary workaround and make serving the app slower, obviously :) Any news about this issue? |
Add command to empty cache before serving vuejs/vue-cli#3065
Still an issue for almost 2 years now. |
I tried // vue.config.js
lintOnSave: true, and // package.json
"serve": "rimraf -rf ./node_modules/.cache/vue-loader && vue-cli-service serve", none of them work. |
Am also getting the same problem 3 years later |
Version
3.2.1
Reproduction link
http://no.link
Environment info
Steps to reproduce
vue create test
or create project invue ui
;default
template;vue ui
and inConfiguration -> ESLint configuration
select configStrongly recommended
orRecommended
;npm run serve
-> no any warnings;App.vue
, simply re-save it (or make small changes) -> warnings shown.What is expected?
Terminal should show warnings on initial
npm run serve
without any additional actions with a files.What is actually happening?
After
npm run serve
it is necessary to make any changes with a files in order to get ESLint warnings.The text was updated successfully, but these errors were encountered: