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

Having some difficulty using this on an M1 mac #26

Closed
cvkgroup opened this issue Nov 19, 2021 · 6 comments · Fixed by #27
Closed

Having some difficulty using this on an M1 mac #26

cvkgroup opened this issue Nov 19, 2021 · 6 comments · Fixed by #27

Comments

@cvkgroup
Copy link

This looks like a great library, but it doesn't seem to want to install on an M1 mac because puppeteer is hard-coded to be version 5.x. Prior to version 10 of puppeteer there was a bug that prevented the download of chromium and failed out, so upgrading to 10+ would resolve, but since this is a library/template there's no opportunity to upgrade it at install time.

Any chance you could add the caret to the version so it'll accept a later version of puppeteer if already installed, or better yet, upgrade puppeteer to latest and resolve any issues with that?

`

[email protected] preinstall /Volumes/repo/my-must-have-app/node_modules/yarn
:; (node ./preinstall.js > /dev/null 2>&1 || true)

[email protected] install /Volumes/repo/my-must-have-app/node_modules/cra-template-must-have-libraries/node_modules/puppeteer
node install.js

The chromium binary is not available for arm64:
If you are on Ubuntu, you can install with:

apt-get install chromium-browser

/Volumes/repo/my-must-have-app/node_modules/cra-template-must-have-libraries/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112
throw new Error();
^

`

@EliEladElrom
Copy link
Owner

Hey, @cvkgroup I prefer not to use libraries with a caret. If you check the library you will see that there is a dependabot.yml that will advise of any upgrades. The reasons are security as well as other libraries that may break due to constant changes of libraries.

When it comes to puppeteer there are a few libraries involved, check package.json:

    "@types/expect-puppeteer": "4.4.5",
    "@types/jest-environment-puppeteer": "4.4.0",
    "@types/puppeteer": "3.0.2",

If you find out which ones need to be upgraded and to what version, feel free to make a pull request or just tell me here in this thread.

Another option you have is to fork this code and then you can maintain your own package.json on your own and add carets where you see fit.

Best, Eli.

@andrewstec
Copy link
Contributor

Hooray! This is a great repo. I saw it and it saves me hours of grunt work to integrate all these essential and awesome libraries. Thanks for putting this out @EliEladElrom.

Hopefully two birds with one stone are resolved by the PR you just merged. I know that I have had tons of versioning issues with Node-sass on Mac's within the last two years (not just this project), and this whole M1 thing is fortunately quite easy to solve now that libraries are upgraded.

Hopefully this makes things easier for newbies and pros trying to use this library.

@EliEladElrom
Copy link
Owner

@andrewstec cool I am glad it worked out :) thanks for the PR. I am also hoping to put out a new starter project in the near future for Nextjs with essential libraries, to speed up server rendering app development.

@andrewstec
Copy link
Contributor

andrewstec commented Nov 29, 2021

@EliEladElrom That sounds quite incredible. I am looking for a library to use for a micro-frontend architecture. If that existed now, I would use it. Looks like I will have to be patient and migrate stuff over. It shall be worth it!

Can't have it all :-) I will keep my eye out for it though! Looking forward to it.

@EliEladElrom
Copy link
Owner

Hey @andrewstec take a look still work in progress I just that up today, but it's in good starting point if you want to already use.. https://github.com/EliEladElrom/next-must-have-libraries

@andrewstec
Copy link
Contributor

@EliEladElrom I see it... and it looks like LinkedIn will see it too!

I really appreciate your efforts in releasing this. If I run into any issues down the road due to aging libraries, I will gladly make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants