Reputation: 336
As you know when we run npm run serve on Vue project it will watch any change on your components and it will build it live so you can see changes. It works like a watcher.
Now I have a project and some components are in subfolders and when I change some code nothing happens with serve command. I mean I have to cancel current build and run npm run serve again to see changes.
This works:
src/views/admin/AdminCampaignList.vue
but this is not working:
src/views/admin/campaign/CampaignAddCustomer.vue
Here is my Vue-congif.js:
module.exports = {
lintOnSave: false,
runtimeCompiler: true,
publicPath: '/'
};
What is going wrong that Vue can't serve "src/views/admin/campaign" folder components?
Upvotes: 0
Views: 1854
Reputation: 103
I had a collision with the same problem on my Linux machine — Vue-CLI tool has been showing me that everything was OK, but has been ignoring a lot of folders at the same time. Then I have tried to clone my repository to the other folder, so it means that I reinstalled node_modules too. But it showed me error like:
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/username/Desktop/folder/public'
So I have just run next line in terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
And now I don't have such problems anymore.
Upvotes: 3