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

Write instruction for local development #8

Open
shotamatsuda opened this issue Dec 2, 2024 · 7 comments
Open

Write instruction for local development #8

shotamatsuda opened this issue Dec 2, 2024 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@shotamatsuda
Copy link
Member

Reported in #3

@shotamatsuda shotamatsuda added the documentation Improvements or additions to documentation label Dec 2, 2024
@gkjohnson
Copy link
Contributor

Is there anything that's changed with local dev, now? I ran a new npm install and was no longer able to run the storybook test pages. I've now completely pulled the branch clean and have run pnpm install, then pnpm run storybook --verbose and am getting the following error:

$ three-geospatial garrett$ pnpm run storybook --verbose

> @three-geospatial/[email protected] storybook .../git/three-geospatial
> nx storybook storybook --port=4400 --no-open "--verbose"

 NX   Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. See errors below.

Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
      An error occurred while processing files for the @nx/storybook/plugin plugin.
    - storybook/.storybook/main.ts: undefined

 ELIFECYCLE  Command failed with exit code 1.

I've run pnpx nx reset and then tried again but got the same error. Is there something else that needs to be added the package.json? Sorry for my naivete with nx and pnpm 🙏

@shotamatsuda
Copy link
Member Author

Hm, that’s strange. No, there isn’t. I cloned a clean one and it worked fine. GitHub Actions is fine as well.

The error message suggests NX encountered errors while processing the project graph. Could you run the command below and check what errors it reports?

nx report

@hallvar
Copy link

hallvar commented Dec 17, 2024

I've run into the same issue after the nx version bump. Restoring to the previous pnpm-lock.yaml and package.json files makes it work again. I'm not very familiar with nx or storyboard but tried to identify the issue. Got as far to notice that if I remove the glsl() plugin in storybook/.storybook/main.ts then the storybook will at least run. Although obviously the stories/demos don't work as intended.

Output of nx report:

 NX   Report complete - copy this into the issue template

Node           : 20.18.1
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.14.2

nx (global)        : 20.2.2
nx                 : 20.2.2
@nx/js             : 20.2.2
@nx/jest           : 20.2.2
@nx/eslint         : 20.2.2
@nx/workspace      : 20.2.2
@nx/esbuild        : 20.2.2
@nx/eslint-plugin  : 20.2.2
@nx/node           : 20.2.2
@nx/react          : 20.2.2
@nx/storybook      : 20.2.2
@nx/vite           : 20.2.2
@nx/web            : 20.2.2
typescript         : 5.6.3
---------------------------------------
Registered Plugins:
@nx/jest/plugin
@nx/eslint/plugin
@nx/vite/plugin
@nx/storybook/plugin
---------------------------------------
⚠️ Unable to construct project graph.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
      An error occurred while processing files for the @nx/storybook/plugin plugin.
    - storybook/.storybook/main.ts: undefined

@hallvar
Copy link

hallvar commented Dec 17, 2024

Might also add to the local development instructions that the developer needs to add the Cesium Ion asset "Japan Regional Terrain" with asset id 2767062 to his Cesium Ion account's asset library.

Find in "Asset Depot"
image

Added to "My Assets"
image

Without adding this asset the storybook demos don't work and just fail with WebGL errors

Thanks for the fantastic work on this repo!

@gkjohnson
Copy link
Contributor

Node : 20.18.1

After toying around earlier I found that upgrading to node 22 fixed the nx storybook issue for me. Not exactly sure why the older versions weren't working, though.

@shotamatsuda
Copy link
Member Author

shotamatsuda commented Dec 17, 2024

@hallvar @gkjohnson Thank you for identifying those. It helped me lot in resolving this. Moving the plugin definitions to vite.config.js fixed the problem in Node v20 (e14c196). I’m not sure when this problem first arose.

Also, I set up build actions for both Node v20 and v22 in Github Actions, which I should have done earlier.

@shotamatsuda
Copy link
Member Author

Might also add to the local development instructions that the developer needs to add the Cesium Ion asset "Japan Regional Terrain" with asset id 2767062 to his Cesium Ion account's asset library.

@hallvar I completely overlooked it. I’ll make sure to add it to the docs. Thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants