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

process is not defined when using workerAction #260

Open
arnaudambro opened this issue Sep 16, 2024 · 1 comment
Open

process is not defined when using workerAction #260

arnaudambro opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@arnaudambro
Copy link

when using a workerAction I get the following error

@remix-run_node.js?v=5474f6a7:21192 Uncaught ReferenceError: process is not defined
    at node_modules/util/util.js (@remix-run_node.js?v=5474f6a7:21192:5)
    at __require2 (chunk-N5SXXOWC.js?v=5474f6a7:21:50)
    at node_modules/stream-slice/index.js (@remix-run_node.js?v=5474f6a7:26697:16)
    at __require2 (chunk-N5SXXOWC.js?v=5474f6a7:21:50)
    at node_modules/@remix-run/node/dist/upload/fileUploadHandler.js (@remix-run_node.js?v=5474f6a7:26894:23)
    at __require2 (chunk-N5SXXOWC.js?v=5474f6a7:21:50)
    at node_modules/@remix-run/node/dist/index.js (@remix-run_node.js?v=5474f6a7:27079:29)
    at __require2 (chunk-N5SXXOWC.js?v=5474f6a7:21:50)
    at @remix-run_node.js?v=5474f6a7:27193:16
node_modules/util/util.js @ @remix-run_node.js?v=5474f6a7:21192
__require2 @ chunk-N5SXXOWC.js?v=5474f6a7:21
node_modules/stream-slice/index.js @ @remix-run_node.js?v=5474f6a7:26697
__require2 @ chunk-N5SXXOWC.js?v=5474f6a7:21
node_modules/@remix-run/node/dist/upload/fileUploadHandler.js @ @remix-run_node.js?v=5474f6a7:26894
__require2 @ chunk-N5SXXOWC.js?v=5474f6a7:21
node_modules/@remix-run/node/dist/index.js @ @remix-run_node.js?v=5474f6a7:27079
__require2 @ chunk-N5SXXOWC.js?v=5474f6a7:21
(anonymous) @ @remix-run_node.js?v=5474f6a7:27193
Show 9 more frames
Show lessUnderstand this error
client:614 [vite] connected.

You can reproduce here (if you have a local instance of postgres setup in the env file as POSTGRESQL_ADDON_URI variable)
https://github.com/betagouv/zacharie/pull/6/files

@ShafSpecs ShafSpecs added the bug Something isn't working label Sep 18, 2024
@ShafSpecs
Copy link
Member

Weird. Does removing it still throw the error? Does a simple worker action also fail:

export async function workerAction({ context }: WorkerActionArgs) {
  const { fetchFromServer } = context;
  await fetchFromServer();
  return null;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants