I have a youtube.d.ts file from DefinitelyTyped project. It works great in my webstorm at edit time but when i go to run it I get a 404 typings/youtube.js not found. There is no file there. What do I do to get this file?
1 Answer
404 typings/youtube.js
I believe you have something like require('typings/youtube.js') somwhere in your code.
This should not be there.
Fix
Webstorm has magic inference to help you develop anyway you want. However your runtime might not support this.
- Remove the
requirecall, - don't confuse
typingswith runtime dependencies. - Read up on modules (https://basarat.gitbooks.io/typescript/content/docs/project/modules.html) and commonjs / webpack (https://github.com/TypeStrong/ts-loader)
1 Comment
jeff
I did have a import {YT} from 'typings/youtube and I removed it and I am past that error. I still have intellisense so I take it that just having a youtube .d.ts in the typings folder locate the type definitions, at least with webstorm. Thank you for the references.