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

README.md development setup for apple silicon and others #1454

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

MarcBaeuerle
Copy link
Contributor

  • This PR is atomic (i.e., it fixes one issue at a time).
  • The title is a concise semantic commit message (e.g. "fix: correctly handle undefined properties").

I noticed a week ago you migrated from yarn to npm, however I tried setting up the project for the first time today and I was running into issues when running npm install (command failed: yarn run postinstall-postinstall), until I used the correct yarn version (v1). Originally included this in the readme but removed since I don't know if that will be fixed, should I create an issue?

@domoritz
Copy link
Member

Why is this arm specific or depends on the node version?

Doesn't the error message already describe what packages may be needed?

@MarcBaeuerle
Copy link
Contributor Author

MarcBaeuerle commented Nov 27, 2024

arm specific: the error messages just stated that it failed to fetch canvas packages. Since there are no prebuilt binaries that can be downloaded for apple silicon, the workaround is needed. No clear error messages and StackOverflow threads were outdated.

yarn: npm install only worked with yarn v1, and failed with yarn v2 v3 and v4. There were no error messages that indicated you need to switch versions, I only knew this because I faced a similar issue before.

@domoritz
Copy link
Member

Hmm, which node version do you have. I just tried in my M1 Mac and didn't need to build canvas with node 20.

~/Developer/editor on  master via  v20.18.0 took 13s ❯ trash node_modules/
~/Developer/editor on  master via  v20.18.0 ❯ npm i
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.

> postinstall
> husky && npx patch-package
...

@MarcBaeuerle
Copy link
Contributor Author

I tried with node 18, 23, 21. I could test again by removing canvas if you'd like. Also, running the editor with docker gives me the same canvas errors.

README.md Outdated Show resolved Hide resolved
@domoritz domoritz changed the title Update: README.md development setup for apple silicon README.md development setup for apple silicon and others Nov 27, 2024
@domoritz
Copy link
Member

Thanks for checking. I made the message a bit more generic as this may apply to never x86 as well.

@domoritz domoritz merged commit a28b3d6 into vega:master Nov 27, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants