Example 2: TS2304: Cannot find name 'GetCurrentVideoPlayer'.
\nThis method comes from my Sprockets asset pipeline in app/assets/javascripts
.
// @tsignore - From vanilla JS\nconst player = GetCurrentVideoPlayer();\n
I'm assuming these are TypeScript compilation settings I need to change? I couldn't figure out which settings I need to change and how to make these warnings, not hard errors. The code works, but now TypeScript is detecting it as a hard error.
\nIs there any way to figure out what the original Webpacker + TypeScript compilation settings were? My tsconfig.json
is exactly the same as before with Shakapacker.
Are you using fork-ts-checker-webpack-plugin
? We've got this outlined in the setup docs, but this plugin is optional and will prevent compilation on TS errors.
Shooting in the dark but that's the most obvious thing I can think of
","upvoteCount":1,"url":"https://github.com/shakacode/shakapacker/discussions/422#discussioncomment-8576432"}}}-
I've upgraded from Webpacker 5.4.4 to Shakapacker 7.2.2, and I have over 200 errors from TypeScript that are blocking successful compilation. Previously these errors were warnings. Here are some examples of the errors: Example 1: TS2339: Property 'YT' does not exist on type 'Window & typeof globalThis'
Example 2: TS2304: Cannot find name 'GetCurrentVideoPlayer'.
I'm assuming these are TypeScript compilation settings I need to change? I couldn't figure out which settings I need to change and how to make these warnings, not hard errors. The code works, but now TypeScript is detecting it as a hard error. Is there any way to figure out what the original Webpacker + TypeScript compilation settings were? My |
Beta Was this translation helpful? Give feedback.
-
@tomdracz do you know? |
Beta Was this translation helpful? Give feedback.
-
Are you using Shooting in the dark but that's the most obvious thing I can think of |
Beta Was this translation helpful? Give feedback.
Are you using
fork-ts-checker-webpack-plugin
? We've got this outlined in the setup docs, but this plugin is optional and will prevent compilation on TS errors.Shooting in the dark but that's the most obvious thing I can think of