Webpack build error
See original GitHub issueVery odd but looks like a js file is importing it’s ts version and causing an error, this is probably an issue in my build system.
ERROR in ./node_modules/apollo-cache-inmemory/src/optimism.ts 1:8
[0] Module parse failed: Unexpected token (1:8)
[0] You may need an appropriate loader to handle this file type.
[0] > declare function require(id: string): any;
[0] |
[0] | export type OptimisticWrapperFunction<
[0] @ ./node_modules/apollo-cache-inmemory/lib/optimism.js 1:11-30
[0] @ ./node_modules/apollo-cache-inmemory/lib/inMemoryCache.js
[0] @ ./node_modules/apollo-cache-inmemory/lib/index.js
[0] @ ./node_modules/apollo-boost/lib/index.js
[0] @ ./src/apolloClient.ts
[0] @ ./src/_client.tsx
_Originally posted by @rlancer in https://github.com/apollographql/apollo-client/issues/3980#issuecomment-428316959_
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Webpack build error - node.js - Stack Overflow
Strange workaround: I zipped my entire node_modules map and transfered it to PC_A and placed it correctly. Now webpack builds just fine. So...
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >This will make you more efficient at debugging Webpack ...
In this article we'll build a very primitive plugin for Webpack and then I'll show you how to find out if this plugin...
Read more >next build fails with webpack error #25276 - GitHub
I'm using webpack 4 and started receiving this error today in my monorepo after updating next. Fixed it for now by using "next":...
Read more >Webpack build error - Questions - Babylon.js Forum
Failed to compile. ./node_modules/@babylonjs/core/Misc/environmentTextureTools.js 100:39 Module parse failed: Unexpected token (100:39) File was ...
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
If you want to have the former configuration you need to pass an absolute path to your
src/
directory, e.g.:Issue was in my webpack config
I removed ‘src’ and it all worked