angular2-nobullshit-boilerplate icon indicating copy to clipboard operation
angular2-nobullshit-boilerplate copied to clipboard

WebStorm reports error on untouched fork

Open frodefi opened this issue 10 years ago • 2 comments

After forking your great repo, doing an npm install and then opening the untouched code in WebStorm, it reports an error as you can see in the image below. Error message is for App in the line import {App} from './components/index'; and says Corresponding file is not included in tsconfig.json. But executing npm run devserver gives no errors and the app is running fine in the browser.

If I remove this from this tsconfig.json:

"files": [
  "lib/index.ts"
]

then the error is gone. The app also runs fine (also after stopping and starting devserver), but just before the webpack: bundle is now VALID. there are many errors all saying ... error TS2300: Duplicate identifier ..., but as mentioned, the app works fine.

What would be the way to make both WebStorm and devserver happy?

screenshot of error

frodefi avatar Jan 21 '16 20:01 frodefi

Ok, I found the solution I removed the same lines of code in tsconfig.js as above, and added instead

"exclude": [ "node_modules" ]

Then everybody is happy :) Maybe this would be a better approach for the boilerplate?

frodefi avatar Jan 21 '16 23:01 frodefi

Can you please create a PR? THanks

shprink avatar Jan 22 '16 00:01 shprink