-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(nextjs): CLI binary not found on Windows #6015
fix(nextjs): CLI binary not found on Windows #6015
Conversation
1cad78e
to
8631f12
Compare
3f05bf7
to
538e087
Compare
Why doesn't All the access seems to go through the async |
The failures are rather strange: Maybe caused by using a non-direct dependency (ie. Perhaps This would help with the fact that the |
Sadly don't have the answer to those questions. @kamilogorek have you ever thought about doing this? |
As for the errors: You may need to add I think it would go here:
|
Thanks @lforst, that appears to have fixed it! |
The one thing we need to check here is if It was mainly this issue: #3865 |
The CLI uses this code (and relevant PR) for the binary path, there will be no path to auto resolve: /**
* Absolute path to the sentry-cli binary (platform dependent).
* @type {string}
*/
let binaryPath = eval(
"require('path').resolve(__dirname, require('os').platform() === 'win32' ? '../sentry-cli.exe' : '../sentry-cli')"
); Further context:
There are alternatives to function getPath(): string {
const parts = [];
parts.push(__dirname);
parts.push('..');
parts.push(`sentry-cli${process.platform === 'win32' ? '.exe' : ''}`);
return path.resolve(...parts);
}
const binaryPath = getPath(); |
To avoid Rollup warnings about
and then simply use |
I like that plan! Lemme go through it all. @lobsterkatie do you have any thoughts on this going forward? |
I think we need to add:
But otherwise that sounds like a totally reasonable plan to me. |
This PR is superseded by #6096 which uses the route described in the above comments. |
Fixes #4829
This was caused by two issues:
.exe
Since the CLI
getPath()
function returns the correct binary location now, and after the above issue is fixed, this PR seems like a sensible route.