Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'gatsby-telemetry' #28646

Closed
kasipavankumar opened this issue Dec 16, 2020 · 6 comments · Fixed by #28652
Closed

Error: Cannot find module 'gatsby-telemetry' #28646

kasipavankumar opened this issue Dec 16, 2020 · 6 comments · Fixed by #28652
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@kasipavankumar
Copy link
Contributor

Description

After the 2.29.0 update, gatsby develop & gatsby build throws an error stating Cannot find module 'gatsby-telemetry'. This occurs on both CI (Github Actions) and locally. Tried a fresh install of node_modules but to no avail.

Stack trace
> dkpk@1.1.13 develop C:\Code\portfolio
> gatsby develop -H 0.0.0.0

success open and validate gatsby-configs - 0.540s

Error in
"C:\Code\portfolio\node_modules\gatsby-plugin-page-creator\gatsby-node.js":
Cannot find module 'gatsby-telemetry'
Require stack:
- C:\Code\portfolio\node_modules\gatsby-plugin-page-creator\gatsby-node.js
- C:\Code\portfolio\node_modules\gatsby\dist\bootstrap\resolve-module-exports.js
- C:\Code\portfolio\node_modules\gatsby\dist\bootstrap\load-plugins\validate.js
- C:\Code\portfolio\node_modules\gatsby\dist\bootstrap\load-plugins\load.js
- C:\Code\portfolio\node_modules\gatsby\dist\bootstrap\load-plugins\index.js
- C:\Code\portfolio\node_modules\gatsby\dist\services\initialize.js
- C:\Code\portfolio\node_modules\gatsby\dist\services\index.js
- C:\Code\portfolio\node_modules\gatsby\dist\state-machines\develop\services.js
- C:\Code\portfolio\node_modules\gatsby\dist\state-machines\develop\index.js
- C:\Code\portfolio\node_modules\gatsby\dist\commands\develop-process.js
- C:\Code\portfolio\.cache\tmp-16568-jQdwdvLPA6mq

Steps to reproduce

Unfortunately, I'm not able to reproduce the issue. I tried on Codesandbox.

Expected result

gatsby develop & gatsby build should succeed without errors.

Actual result

gatsby develop & gatsby build throws cannot find module 'gatsby-telemetry'.

Environment

System:
  OS: Windows 10 10.0.19042
  CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
Binaries:
  Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
  npm: 6.14.9 - C:\Program Files\nodejs\npm.CMD
Languages:
  Python: 3.9.0 - /c/Users/D. Kasi Pavan Kumar/AppData/Local/Programs/Python/Python39/python
Browsers:
  Chrome: 87.0.4280.88
  Edge: Spartan (44.19041.423.0), Chromium (87.0.664.60)
npmPackages:
  gatsby: ^2.29.0 => 2.29.0
  gatsby-image: ^2.8.0 => 2.8.0
  gatsby-plugin-manifest: ^2.8.0 => 2.8.0
  gatsby-plugin-offline: ^3.6.0 => 3.6.0
  gatsby-plugin-react-helmet: ^3.6.0 => 3.6.0
  gatsby-plugin-sass: ^2.7.0 => 2.7.0
  gatsby-plugin-sharp: ^2.11.0 => 2.11.0
  gatsby-plugin-sitemap: ^2.8.0 => 2.8.0
  gatsby-remark-autolink-headers: ^2.7.0 => 2.7.0
  gatsby-remark-copy-linked-files: ^2.6.0 => 2.6.0
  gatsby-remark-images: ^3.7.1 => 3.7.1
  gatsby-remark-prismjs: ^3.9.0 => 3.9.0
  gatsby-remark-relative-images: ^2.0.2 => 2.0.2
  gatsby-source-filesystem: ^2.7.0 => 2.7.0
  gatsby-transformer-remark: ^2.12.0 => 2.12.0
  gatsby-transformer-sharp: ^2.8.0 => 2.8.0
npmGlobalPackages:
  gatsby-cli: 2.16.0
@kasipavankumar kasipavankumar added the type: bug An issue or pull request relating to a bug in Gatsby label Dec 16, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 16, 2020
@kasipavankumar
Copy link
Contributor Author

For a workaround, npm i gatsby-telemetry solves the issue.

@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 16, 2020
@LekoArts
Copy link
Contributor

Hi!

I've tried this with npm init gatsby to create a new site, start it with gatsby develop and it's all fine. Have you removed .cache, public, a lock file (e.g. package-lock.json) and node_modules and tried again?

@kasipavankumar
Copy link
Contributor Author

Greetings, thanks for your response.

Yes, I have tried removing .cache, public and node_modules but to no avail.
For temporary workaround, I have added the gatsby-telemetry package as a devDependency.

To be more specific, the issue arised after updating gatsby-plugin-sharp to 2.11.0 and not gatsby.

@LekoArts
Copy link
Contributor

Fixed in gatsby-plugin-page-creator@2.7.1

@pieh
Copy link
Contributor

pieh commented Dec 16, 2020

Just to clarify - above is dependency of gatsby, so in this case this means fix pulished in gatsby@2.29.1 ;)

@kasipavankumar
Copy link
Contributor Author

Thank you, the problem is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants