Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm module not installed webpack error

import CustomWidget from '@/components/widgets/CustomWidget';

When I import a Vue component. The Vue component works and all, but when I use @ it cannot resolve the declaration (it gives me cannot find declaration to go to).

I have this problem on Vue application and nuxt applications.

I am using WebStorm 2018.2.2

like image 781
Roger Federer Avatar asked Sep 07 '26 23:09

Roger Federer


1 Answers

For Vue-cli 3.x, you have to specify node_modules/@vue/cli-service/webpack.config.js as Preferences | Languages & Frameworks | JavaScript | Webpack value. Resolving webpack aliases in Nuxt projects doesn't currently work, please follow WEB-32614 for updates

like image 184
lena Avatar answered Sep 11 '26 12:09

lena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!