-
-
Notifications
You must be signed in to change notification settings - Fork 9
1.0.7 ./sentry_cpu_profiler-darwin-arm64-115.node not found #171
Comments
Yeah I get almost the same error in my Next.js project running
It looks like #173 would fix this. Running those commands separately and manually from the terminal resolved this. |
We've released 1.0.8 and some folks internally at Sentry who had issues have said that they now seem to be resolved. Do you mind upgrading and letting me know if this still happens? |
Error still persists |
For those having the issue, I've found in the code the following workaround : |
I don't have this token set. Where is yours located? It could be due to the token being set it overrides the default space it looks for the file. |
The issue is here |
Maybe I am missing something but based on the Node docs the You don't have a --ignore-scripts anywhere in you npm specified. You can check by with npm config get ignore-scripts |
No I don't npm ignore scripts |
Oh I found this is related to yarn, because when I start my server with npm (and nodemon) this works ! |
Interesting since I use yarn 😅. But then again I am also on the latest node version so maybe there lies the crux. But happy that it works at least. |
For my case, it appears that the issue was a conflict on where and how was installed node and yarn on my laptop. I had a yarn version installed with brew and a node version with brew also but not used, my default node binary was the one installed with nvm. (type When I used yarn dlx to use nodemon and ts-node to start my server which is using your library, the node 20.4 version (the brew one) was used by yarn for any reason. To fix this, I executed Hope that helps someone, not sure if it the same reason than @andylacko. |
Anyone on the latest version of the package still experiencing this problem? |
Yes, I'm still seeing this issue with PNPM. |
Probably you've already tried this but as a novelty, have you've already tried:
|
@nicksrandall can you please run a clean install as @whaagmans suggested? I just attempted to install the package via pnpm, build and run and I could not reproduce your error. |
This is still unusable in M1 macs. Did anyone find a workaround for this? |
@yash-coded are you using pnpm as well? |
Hey @JonasBa, I'm using |
@yash-coded are you by any chance ignoring install scripts? What does |
@JonasBa I did a clean install and realized that I think the issue is with my bundler and maybe not pnpm? I'm using remix (which is using esbuild) and the server fails to start when I'm using this package because node can't find the .node file |
@yash-coded, you are running the script with node 16 - it looks for binary compatible with 93 identifier which corresponds to node 16 and not node 18 as you mentioned. Can you make sure to run the script with node 18? |
Sorry about that, i switched to node 16 just to try another version when I took the screenshot but I was getting the same error with node 18: |
@yash-coded I dont think your install script ran for some reason (or your node version was different at install time). Can you cd into node_modules/@sentry/profiling-node and manually run |
This was with node 16 but I got the same result with node v18
|
Hmm, I think compiling from source might fail here and we may be swallowing error. If a binary is successfully compiled from source on your local machine then it should work (or at least the error would have been different) do you mind running |
|
Quick search for that error finds nodejs/node-report#102 (comment) Do you have a |
I'm hitting this issue too.
I see the following |
@mrmckeb mind running the steps that I described manually in and tell me if you see errors? #171 (comment) |
Closing due to inactivity. @mrmckeb please make sure you don't have a "make" package installed that is confusing the build toolchain. Feel free to reopen the issue if you still have a problem - I would just ask you to re-run the commands I described in #171 and paste the output so we can efficiently debug |
I faced the similar issue issue with M1 Macs , Node 20.5.1, npm : 8.5.5 running npm i @sentry/profiling-node ( latest package removed the error for me) |
This is also not working for me. Basic Remix app. |
@nicksrandall mind opening a new issue with an example stacktrace? This issue has been polluted by a mix of a few different errors (and causes) and I would like to not add to it. |
I am seeing the same error on Google Cloud Run:
I am using this template https://github.com/GoogleCloudPlatform/cloud-run-microservice-template-nodejs |
I am seeing this on MacOS M2 Max as well. |
@jamespsterling @theobouwman It seems like this is attempting to load the binaries for Node version 21. We do not officially support non LTS node versions and we do not provide precompiled binaries for these environments - v21 is not LTS. You will have to compile the binaries yourself and install the required tooling (which depends on the images you are using, but tipically involves python, git and a couple other build tools). The alternative is to downgrade to v20 or wait for when v22 reaches LTS and we provide precompiled binaries. |
In case this helps others: I was seeing this issue on a fresh Ubuntu box. I'd install node via Once I installed |
🎉🎉🎉 Switching to Node v20 from v21 fixed the issue for me! 🎉🎉🎉
I'm using |
I got Node 22 to work (even though it's not yet LTS...) by updating these Sentry packages to their latest versions in
I did this because Node 20 suddenly started throwing errors during build and deployment in the Sentry step.
It looks like these Sentry binary versions are highly unreliable. It would be nice to have a more robust and reliable automatic build process at Sentry to build these binaries for all Node versions (not just LTS). My LTS Node 20 suddenly started throwing errors during build, but the non-LTS Node 22 works, which is not supposed to work based on the above comment that I quoted |
@pppdns It has been a while since that comment and we actually build binaries for v22 since a few months now, so the binaries working for v22 is expected.
Would you mind sharing what sort of errors you were seeing? Did you upgrade or change anything in your environment? Our code here hadnt changed, so I suspect there might be something external that caused this. Please send us the error so we can investigate Regarding the binaries being unreliable, I would disagree that it's the actual binaries that are unreliable. That said, there is a lot of confusion and required knowledge around how nodejs and bundling works with native binaries which can unfortunately lead to errors in the setup. We'll try see if we can improve that. |
I'll see if I can get the error logs, if yes, I will post them. Regarding the confusion around how these binaries are supposed to work, some extra documentation would be nice. I don't think it's available for the public currently |
Not sure why this started happening just today, the project was running fine and is in production but just trying to run it today in my local it gave me the same error:
|
There is an issue because the code checks your current Node.js version and retrieves the abi for version "21.0.0" (which is 120). Therefore, if I use Node.js version 18.18.0, it will use the correct profiling version. It worked! |
Yes, that is because we only support even major versions of nodejs as they have long term support as opposed to becoming unsupported after ~6 months.
|
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
SDK Version
1.0.7
Link to Sentry event
No response
What environment is your node script running in?
20.3.1
pnpm
How is your code deployed and bundled?
webpack
Steps to Reproduce
try to run project
Expected Result
work
Actual Result
Error: Cannot find module './sentry_cpu_profiler-darwin-arm64-115.node'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1072:15)
at Function.Module._load (node:internal/modules/cjs/loader:925:27)
at Module.require (node:internal/modules/cjs/loader:1139:19)
at require (node:internal/modules/helpers:121:18)
at /Users/andy/Developer/intellcre/node_modules/.pnpm/@sentry[email protected]/node_modules/@sentry/profiling-node/lib/index.js:16691:57
at importCppBindingsModule (/Users/andy/Developer/intellcre/node_modules/.pnpm/@sentry[email protected]/node_modules/@sentry/profiling-node/lib/index.js:16691:14)
at /Users/andy/Developer/intellcre/node_modules/.pnpm/@sentry[email protected]/node_modules/@sentry/profiling-node/lib/index.js:16717:32
^C/Users/andy/Developer/intellcre/services/api:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL [email protected] start:dev:
pnpm run assets:copy && nest start --watch
Command failed with signal "SIGTERM"
ELIFECYCLE Command failed.
The text was updated successfully, but these errors were encountered: