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

fix: Apple Silicon Support Cannot find module /node-v115-darwin-arm64-unknown/pprof.node #35

Open
jjangga0214 opened this issue Oct 8, 2023 · 3 comments

Comments

@jjangga0214
Copy link

jjangga0214 commented Oct 8, 2023

Hi!

It seems N-API binding for Apple Silicon is not to be installed.

Error: Cannot find module '/Users/<user>/<path>/<to>/node_modules/.pnpm/pprof@3.2.1/node_modules/pprof/build/node-v115-darwin-arm64-unknown/pprof.node'

Info

  • M1 Max
  • OS: Ventura 13.5.2(22G91)
  • node: v20.6.1
  • pnpm: 8.7.6
@jjangga0214
Copy link
Author

jjangga0214 commented Oct 8, 2023

Reinstalling solved the problem.
I think this happened because the package is not prebuilt.
It's to be automatically built after the installation, and if something wrong happens, it fails to create proper .node file.

@jjangga0214
Copy link
Author

jjangga0214 commented Oct 19, 2023

This issue happens unconditionally. (So re-opening this issue!)
Reinstalling does not solve the issue this time.

@jjangga0214
Copy link
Author

jjangga0214 commented Oct 19, 2023

I was working on monorepo by pnpm workspace.
I removed every node_modules directories, the one from the root of the monorepo and others each in the leaf packages.
And from the root of the monorepo, I pnpm install again.
This time it starts to work.

Every time you add a new package that depends on @pyroscope/nodejs into monorepo,
you should do this process.

I hope @pyroscope/nodejs depends on prebuilt sub packages, like the way swc does.

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

No branches or pull requests

1 participant