question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack doesn't like types. Failed to compile.

See original GitHub issue

I 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:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
GuilhermeBergamoBRcommented, May 13, 2021

I’m facing this issue right now. Anyone alive here?

0reactions
luckinamargocommented, Aug 29, 2021

Same(

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found