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

Plugin does not work for monorepo #271

Closed
Simply007 opened this issue Feb 10, 2022 · 4 comments · Fixed by #281
Closed

Plugin does not work for monorepo #271

Simply007 opened this issue Feb 10, 2022 · 4 comments · Fixed by #281
Assignees
Labels
bug Something isn't working

Comments

@Simply007
Copy link

Description

There is a Gatsby Kontent packages monorepo containing a development site + a couple of examples. As a part of kontent-ai/gatsby-packages#202 I wanted to use this plugin instead deprecated Gatsby Cache plugin.

Steps to reproduce

  • Fork the repository
  • Register the repo to Netlify with its config (you can substitute dsg-ssr, with navigation/relationships/resolution)
    • Build command yarn build:dsg-ssr
    • Publish directory /examples/dsg-ssr/public
  • Install this plugin

The build failed on (error from example dsg-ssr, but the same if on all examples):

12:07:02 PM: ────────────────────────────────────────────────────────────────
12:07:02 PM:   Dependencies installation error                               
12:07:02 PM: ────────────────────────────────────────────────────────────────
12:07:02 PM: ​
12:07:02 PM:   Error message
12:07:02 PM:   A Netlify Function failed to require one of its dependencies.
12:07:02 PM:   Please make sure it is present in the site's top-level "package.json".
​
12:07:02 PM:   In file "/opt/build/repo/.netlify/functions-internal/__api/__api.js"
12:07:02 PM:   Cannot find module '../../../.cache/functions/manifest.json' from '/opt/build/repo/.netlify/functions-internal/__api'
12:07:02 PM: ​
12:07:02 PM:   Resolved config
12:07:02 PM:   build:
12:07:02 PM:     command: yarn build:dsg-ssr
12:07:02 PM:     commandOrigin: ui
12:07:02 PM:     environment:
12:07:02 PM:       - NODE_VERSION
12:07:02 PM:     publish: /opt/build/repo/examples/dsg-ssr/public
12:07:02 PM:     publishOrigin: ui
12:07:02 PM:   functions:
12:07:02 PM:     __api:
12:07:02 PM:       external_node_modules:
12:07:02 PM:         - msgpackr-extract
12:07:02 PM:       included_files:
12:07:02 PM:         - examples/dsg-ssr/.cache/functions/**

Expected behavior

Build does not fail and DSG and SSG work.

Environment

I might be able to share the netlify project, if you need.

@Simply007
Copy link
Author

Current status without netlify plugin is this one: netlify/gatsby-plugin-netlify#67

-> https://kontent-gatsby-example-dsg-ssr.netlify.app/

@ascorbic
Copy link
Contributor

Thanks @Simply007 . I have a decent idea what's causing this, and hopefully can fix it later this week.

@ascorbic ascorbic self-assigned this Feb 14, 2022
@Simply007
Copy link
Author

Simply007 commented Feb 14, 2022

Thanks @Simply007 . I have a decent idea what's causing this, and hopefully can fix it later this week.

That would be great! :) If you need me to test out something, let me know.

@Simply007
Copy link
Author

Thx for taking a look at the issue @ascorbic! What are the plans for releasing the new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants