This is a weird one.
I am running temporal inside of an NX monorepo and i have everything running okay at the moment.
Now i am trying to get everything running inside docker and i keep running into webpack build errors about polyfills
2022-08-26T21:33:35.952Z [ERROR] ERROR in ./node_modules/webpack/lib/util/identifier.js 7:13-28
2022-08-26T21:33:35.952Z [ERROR] Module not found: Error: Can't resolve 'path' in '/app/node_modules/webpack/lib/util'
2022-08-26T21:33:35.952Z [ERROR]
2022-08-26T21:33:35.952Z [ERROR] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
2022-08-26T21:33:35.952Z [ERROR] This is no longer the case. Verify if you need this module and configure a polyfill for it.
2022-08-26T21:33:35.952Z [ERROR]
2022-08-26T21:33:35.952Z [ERROR] If you want to include a polyfill, you need to:
2022-08-26T21:33:35.952Z [ERROR] - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
2022-08-26T21:33:35.952Z [ERROR] - install 'path-browserify'
2022-08-26T21:33:35.952Z [ERROR] If you don't want to include a polyfill, you can use an empty module like this:
2022-08-26T21:33:35.952Z [ERROR] resolve.fallback: { "path": false }
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/webpack/lib/DllReferencePlugin.js 14:26-72
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/webpack/lib/index.js 180:9-40
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/@temporalio/worker/lib/workflow/bundler.js 29:34-52
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/@temporalio/worker/lib/index.js 32:16-45
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/nestjs-temporal/dist/temporal.explorer.js 26:17-46
2022-08-26T21:33:35.952Z [ERROR] @ ./node_modules/nestjs-temporal/dist/index.js 14:13-43
2022-08-26T21:33:35.952Z [ERROR] @ ./src/app/app.module.js 5:26-52
2022-08-26T21:33:35.952Z [ERROR] @ ./src/main.js 11:21-48
Im trying to think of the question i need to ask here, but it seems that once i get the code into the docker container that the worker.create
method isnt just compiling my workflow code its trying to rerun all the files.
I jumped into the docker container and checked that the workflowsPath only contained the workflow code and that seems to be accurate.
I am going to try and spend some time creating a repo that encompasses this, but it might take a while