apollo-client: DevTools failed to load SourceMap from @apollo/client

DevTools failed to load SourceMap: Could not load content for 
webpack:///node_modules/@apollo/client/utilities/observables/Observable.js.map: HTTP error: status code 404, 
net::ERR_UNKNOWN_URL_SCHEME

Intended outcome: I just added the apollo/client to my Webpack/TS/React project and now I have a tons of warnings in my devtools. I can use some hack to ignore them, but you might wants to know about this inconvenience.

I also added ‘source-map-loader’, and now warnings had change:

./node_modules/@apollo/client/version.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/ruafjxn/rayf/custody-rbo-widget/node_modules/@apollo/src/version.ts' file: Error: ENOENT: no such file or directory, open '/Users/ruafjxn/rayf/custody-rbo-widget/node_modules/@apollo/src/version.ts'

Actual outcome: There is not any warnings.

How to reproduce the issue: Just import apollo/client and run a project with webpack. I use webpack@4

Versions npx envinfo@latest --preset apollo --clipboard

  System:
    OS: macOS 10.15.6
  Binaries:
    Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.14.7 - ~/.nvm/versions/node/v10.19.0/bin/npm
  Browsers:
    Chrome: 84.0.4147.89
  npmPackages:
    @apollo/client: ^3.1.3 => 3.1.3 

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 22 (7 by maintainers)

Most upvoted comments

Any solutions to this yet? Its very spammy as it has a lot of files, so its a bit frustrating

@benjamn - That fixed it! Thanks for letting me know .

@richardscarrott Apollo Client doesn’t use webpack for any part of our build, so I don’t think we’re responsible for those webpack:///node_modules/... URLs that the browser is complaining about. You might want to open an issue over at https://github.com/apollographql/apollo-client-devtools/ if this seems devtools-specific.

I have the same problem with Apollo Angular, so this doesn’t seem to be related to React:

  System:
    OS: Linux 5.8 Arch Linux
  Binaries:
    Node: 14.13.1 - /usr/bin/node
    npm: 6.14.7 - /usr/bin/npm
  Browsers:
    Firefox: 81.0.2
  npmPackages:
    @apollo/client: ^3.2.4 => 3.2.4 
    apollo-angular: ^2.0.4 => 2.0.4 

@ryan-zheng-teki yes, I’m suggesting to ship the typescript source files in the npm package tarball, or alternatively, to ship inline source map comments.

edit: what I mean is that apollo-client should do this. If you want to, you can fork and rebuild locally, I suppose