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

[gatsby-dev] not copying dist files in a workspace/monorepo setup #18314

Closed
StuartRayson opened this issue Oct 8, 2019 · 3 comments
Closed
Labels
stale? Issue that may be closed soon due to the original author not responding any more.

Comments

@StuartRayson
Copy link
Contributor

StuartRayson commented Oct 8, 2019

Summary

I'm having an issue seeing compiled dist changes using gatsby-dev in a workspace setup.

Relevant information

Our gatsby site is set up in a monorepo using yarn workspaces
I've followed the documentation for testing changes using gatsby dev.
I get this message changing my package.json to use the forked version.

$ gatsby-dev --packages gatsby
Yarn workspace found.
Starting local verdaccio server
[2019-10-08 10:34:46]  warn --- Verdaccio started
Started local verdaccio server
Publishing gatsby@2.15.7-dev-1570527286941 to local registry
Published gatsby@2.15.7-dev-1570527286941 to local registry
Installing packages from local registry:
 - gatsby
Changing deps in ..../packages/my-gatsby-site/package.json to use @gatsby-dev

Installation complete

When running a build, I had an issue with resolving node_modules,

success run static queries - 0.096 s — 11/11 149.57 queries/second

 ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Cannot find module '@babel/plugin-proposal-class-properties' from '..../packages/my-gatsby-site'

File: .cache/production-app.js

I fixed this issue by using nohoist in my workspace config. This issue has been mentioned before in #11780.

  "workspaces": {
    "packages": [
      "packages/*"
    ],
    "nohoist": [
      "**/gatsby",
      "gatsby/**",
      "**/gatsby-*",
      "gatsby-*/**",
      "**/*-gatsby",
      "*-gatsby/**",
    ]
  },

When making changes in my forked gatsby while running the watch command yarn run watch --scope=gatsby if i run gatsby-dev --packages gatsby I'm expecting these changes copied to my local gatsby site's node_modules

To see my updates, I either have to delete all my node_modules, clear cache and run yarn install, or copy the dist folder from my fork into my local site.

I've seen that if gatsby is set as a dependency in the root package.json, this resolves the node_modules issue, but i feel like this is a workaround for workspace setup.

I can't find anything in the docs; any help would be great

Environment

  System:
    OS: macOS 10.14.5
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.16.1 - ~/.nvm/versions/node/v10.16.1/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.1/bin/npm
  Languages:
    Python: 2.7.10 - /usr/bin/python
  Browsers:
    Chrome: 77.0.3865.90
    Safari: 12.1.1
  npmPackages:
    gatsby: gatsby-dev => 2.15.7-dev-1570525561899
    gatsby-plugin-manifest: ^2.0.25 => 2.2.16
    gatsby-plugin-offline: ^2.0.25 => 2.2.10
    gatsby-plugin-react-helmet: ^3.0.11 => 3.1.7
    gatsby-plugin-typescript: ^2.0.11 => 2.1.7
    gatsby-source-mongodb: ^2.0.16 => 2.1.12
  npmGlobalPackages:
    gatsby-cli: 2.7.49
    gatsby: 2.15.18
@StuartRayson StuartRayson changed the title gatsby-dev not copying dist files in a workspace/monorepo setup [gatsby-dev] not copying dist files in a workspace/monorepo setup Oct 9, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 30, 2019
@gatsbot
Copy link

gatsbot bot commented Oct 30, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot
Copy link

gatsbot bot commented Nov 10, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Nov 10, 2019
@agrawalaayushi
Copy link

Hey @StuartRayson, how did you resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more.
Projects
None yet
Development

No branches or pull requests

2 participants