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

Dev setup broken #5234

Closed
ad1992 opened this issue Jan 24, 2024 · 9 comments
Closed

Dev setup broken #5234

ad1992 opened this issue Jan 24, 2024 · 9 comments
Labels
Close after 30 days Close issue if no response after 30 days Status: Awaiting Reply Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@ad1992
Copy link
Contributor

ad1992 commented Jan 24, 2024

Description

Looks like the dev setup was recently broken probably post 41a9ac9

I am using Mac and tried with below node versions.

I am getting the below errors with different versions of node.js

  1. Using node 18.19.x -
Error [ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (3).
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
  1. Using node 20.x
Error: Cannot find package '/mermaid/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/node_modules/vite/package.json' imported from /mermaid/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vitest/dist/config.js
Did you mean to import [email protected]_@[email protected]/node_modules/vite/index.cjs?

Steps to reproduce

Mentioned above

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@ad1992 ad1992 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 24, 2024
@sidharthv96
Copy link
Member

@ad1992 Which command is throwing this error? I'm on node 18.19.0, no issues.
But I had seen similar issue previously (few months back) when using tsx, which is why we didn't switch to it then.

I've been running develop and next branches multiple times without any issues.

@sidharthv96 sidharthv96 added Status: Awaiting Reply Close after 30 days Close issue if no response after 30 days labels Feb 1, 2024
@ad1992
Copy link
Contributor Author

ad1992 commented Feb 12, 2024

Sorry had been busy for last couple of weeks so couldn't reply.

@sidharthv96 the start server command throws the error 👇

tsx .vite/server.ts

@sidharthv96
Copy link
Member

@ad1992 What's the error?

You have to run

pnpm install
pnpm -w dev

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 12, 2024

@ad1992 What's the error?

The same error I have posted in the issue description, that is happening due tsx .vite/server.ts in dev script.

You have to run

pnpm install
pnpm -w dev

Yes thats what I am doing as mentioned above, tsx .vite/server.ts in dev script. throws error

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 12, 2024

On further debugging, the createViteServer is failing which throws the above errors.

@sidharthv96
Copy link
Member

Try deleting your node_modules folder. This doesn't seem like an issue with mermaid, as our CI is working fine and other contributors aren't facing the issue.

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 12, 2024

Try deleting your node_modules folder. This doesn't seem like an issue with mermaid, as our CI is working fine and other contributors aren't facing the issue.

Yep, I already did that multiple times. Probably this is platform-specific and not related to mermaid. I will also try clearing all possible cache and do a clean install

@ad1992
Copy link
Contributor Author

ad1992 commented Feb 12, 2024

Alright, so something was wrong with my environment. Clearing node modules, pnpm cache resolved this so I am closing.

@ad1992 ad1992 closed this as completed Feb 12, 2024
@ad1992
Copy link
Contributor Author

ad1992 commented Feb 27, 2024

Sadly its weird, whenever I pause and come back to the project after few days, my dev setup breaks 😢

EDIT: fixed, there was some issue with my fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close after 30 days Close issue if no response after 30 days Status: Awaiting Reply Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

2 participants