Skip to content

Conversation

@alexgrozav
Copy link

Fixes vite plugin integration error.

alexgrozav@Alexs-MacBook-Pro editor-ui % pnpm run build

> n8n-editor-ui@0.188.0 build /Users/alexgrozav/Workspace/n8n/n8n/packages/editor-ui
> cross-env NODE_OPTIONS="--max-old-space-size=8192" vite build

node:internal/errors:478
    ErrorCaptureStackTrace(err);
    ^

Error: spawn /Users/alexgrozav/Workspace/n8n/n8n/node_modules/.pnpm/@sentry+cli@2.16.1/node_modules/@sentry/cli/sentry-cli ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /Users/alexgrozav/Workspace/n8n/n8n/node_modules/.pnpm/@sentry+cli@2.16.1/node_modules/@sentry/cli/sentry-cli',
  path: '/Users/alexgrozav/Workspace/n8n/n8n/node_modules/.pnpm/@sentry+cli@2.16.1/node_modules/@sentry/cli/sentry-cli',
  spawnargs: [ 'releases', 'propose-version' ],
  cmd: '/Users/alexgrozav/Workspace/n8n/n8n/node_modules/.pnpm/@sentry+cli@2.16.1/node_modules/@sentry/cli/sentry-cli releases propose-version'
}

@kamilogorek
Copy link
Contributor

This path is the same one that we use for https://github.com/getsentry/sentry-cli/blob/master/scripts/install.js script, so I'm not sure how that change would make a difference tbh.
This looks like an issue with running (possibly caching a result?) of postinstall script, which produces the binary itself, which is then not present during execution.
Do you have a repro repository that we could use to debug this?

@alexgrozav
Copy link
Author

@kamilogorek You can find the exact usage here: https://github.com/n8n-io/n8n/pull/5870/files

I had to patch the package in order to get it to work. Perhaps could have something to do with the fact that it's a monorepo? I'm not entirely sure, but it's worth looking into.

* @returns {string} The path to the sentry-cli binary
*/
function getBinaryPath() {
const parts = [];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use require.resolve instead here, like this:

path.join(require.resolve('@sentry/cli'), `../../bin/sentry-cli${process.platform === 'win32' ? '.exe' : ''}`)

Copy link
Contributor

@kamilogorek kamilogorek Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately, we specifically cannot use require.resolve due to @vercel/nft behavior.

See #1207 and a follow-up in #1374

@kamilogorek
Copy link
Contributor

Perhaps could have something to do with the fact that it's a monorepo? I'm not entirely sure, but it's worth looking into.

Yes, that's most likely it, as it's making links between shared packages in the root directory. I'm out for the next few weeks, but will keep that issue in mind.

@github-actions
Copy link
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

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.

3 participants