Webpack doesn't like types. Failed to compile.
See original GitHub issueI am using expo ~39.0.2 and react native 0.61.4. I created the app using expo init myapp
.
I installed this library and used the following code in App.js:
import RNFetchBlob from 'rn-fetch-blob';
My app crashes and I get this error:
/Users/hayden/Desktop/projects/myapp/node_modules/rn-fetch-blob/index.js 12:12
Module parse failed: Unexpected token (12:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| AppState,
| } from 'react-native'
> import type {
| RNFetchBlobNative,
| RNFetchBlobConfig,
How do I fix? Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Webpack is not failing on TypeScript error - Stack Overflow
I expect the webpack watch process to fail or show some errors but it doesn't fail. Here is what webpack outputs: [webpack-cli] Compilation...
Read more >Compiling and bundling TypeScript libraries with Webpack
TypeScript comes with the tsc (TS compiler) that takes care of that: it compiles your code to ES5 and creates the *.d.ts files...
Read more >Code Splitting - webpack
[webpack-cli] Compilation finished asset index.bundle.js 553 KiB [emitted] ... can not throw any error, cause webpack doesn't know, that script failed.
Read more >webpack or esbuild: Why not both? - LogRocket Blog
js-based build tool like webpack or rollup.js. These tools are written in the same language they compile to — namely, JavaScript or TypeScript....
Read more >fork-ts-checker-webpack-plugin - npm
Webpack plugin that runs TypeScript type checker on a separate process. ... Thanks to that it doesn't block the compilation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m facing this issue right now. Anyone alive here?
Same(