Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Cannot find module 'critters' #135

Closed
Antonytm opened this issue Jan 8, 2021 · 2 comments
Closed

Cannot find module 'critters' #135

Antonytm opened this issue Jan 8, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Antonytm
Copy link

Antonytm commented Jan 8, 2021

Describe the bug
Netlify deploy stopped to work on the code version that worked before.

To Reproduce
Steps to reproduce:

  1. Go to failed deploy
  2. Check logs:

5:37:19 PM: ────────────────────────────────────────────────────────────────
5:37:19 PM: Dependencies installation error
5:37:19 PM: ────────────────────────────────────────────────────────────────
5:37:19 PM: ​
5:37:19 PM: Error message
5:37:19 PM: A Netlify Function failed to require one of its dependencies.
5:37:19 PM: If the dependency is a Node module, please make sure it is present in the site's top-level "package.json".
If it is a local file instead, please make sure the file exists and its filename is correctly spelled.
5:37:19 PM: ​
5:37:19 PM: In file "/opt/build/repo/next-md/exdst/out_functions/next_index/next_index.js"
5:37:19 PM: Cannot find module 'critters'
5:37:19 PM: Require stack:
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/resolve.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/index.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/commands/get.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/main.js
5:37:19 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/bin.js

Versions

  • Next: 10.0.5
  • next-on-netlify: 2.6.3
@zlatanpham
Copy link

I think it can be worked around by adding critters to the package.json file.

@lindsaylevine lindsaylevine added the duplicate This issue or pull request already exists label Jan 9, 2021
@lindsaylevine
Copy link
Contributor

hey @Antonytm! thanks for opening this. this was introduced in a recent version of next. see this comment by my teammate at netlify :). because #103 is tracking this issue, i'll mark this one as a duplicate and close. please track it there! as @zlatanpham pointed out, a current workaround is to install critters or downgrade your next version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants