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.

[3.0.0-beta.38] Cannot find module: 'graphql/language/printer'

See original GitHub issue

Description Trying to build React 16.13 with typescript results in the following:

$ react-scripts build
Creating an optimized production build...
Failed to compile.

./node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
Cannot find module: 'graphql/language/printer'. Make sure this package is installed.

You can install this package by running: yarn add graphql/language/printer.

Looking at past issues this seems to be a regression or at least that this was omitted from the project’s package.json.

Versions System: OS: Linux 4.4 Ubuntu 18.04.4 LTS (Bionic Beaver) Binaries: Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node Yarn: 1.22.0 - ~/.yarn/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v12.15.0/bin/npm npmPackages: @apollo/client: ^3.0.0-beta.38 => 3.0.0-beta.38

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
bryancustercommented, Aug 18, 2020

I have the following (the only three apollo/graphql dependencies) and still receive this error.

...
    "@apollo/client": "^3.1.3",
    "babel-plugin-graphql-tag": "^3.0.0",
    "graphql": "^15.3.0",
...
 WARNING  Compiled with 10 warnings                                                                                      9:22:25 AM
 warning  in ./node_modules/@apollo/client/core/LocalState.js
"export 'BREAK' was not found in 'graphql/language/visitor'
 warning  in ./node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
"export 'print' was not found in 'graphql/language/printer'
 warning  in ./node_modules/@apollo/client/utilities/graphql/directives.js
"export 'visit' was not found in 'graphql/language/visitor'
4reactions
hwillsoncommented, Apr 30, 2021

It doesn’t sound like there is an outstanding issue here, so closing. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 - Stack Overflow
nuxt3 cannot find module 'node_modules/graphql/language/printer' imported from /mnt/d/projects/. output/server/chunks/app/server. mjs.
Read more >
error: cannot find module 'graphql/language/parser' - You.com
Unable to resolve module 'module://graphql/language/parser.js' This issue is comes when you use import gql from 'graphql-tag'. Honestly I don't know why  ...
Read more >
gatsby | Yarn - Package Manager
Gatsby automates code splitting, image optimization, inlining critical styles, lazy-loading, prefetching resources, and more to ensure your site is fast — no ...
Read more >
Changelog - Cypress Documentation
Fixes #24611; Fixed an 11.0.0 regression where using custom reporters would cause Cypress to throw a 'Cannot find module' error.
Read more >
Open Source Used In Socio 1.0 - Cisco
1.235 builtin-modules 3.1.0. 1.235.1 Available under license. 1.236 object-assign 3.0.0. 1.236.1 Available under license. 1.237 underscore.deferred 0.4.0.
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