Error while deploying app with adapter-node and any service like pm2 or nodemon #10076
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is what i'm getting on with pm2.
ReferenceError: __dirname is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/shivammeena/WebstormProjects/hege-admin/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at requireLibrary (file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/chunks/index4-e5930194.js:43:2322)
at file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/chunks/index4-e5930194.js:263:7
at requireClient$1 (file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/chunks/index4-e5930194.js:612:4)
at requireClient (file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/chunks/index4-e5930194.js:623:7)
at file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/chunks/index4-e5930194.js:628:21
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:526:24)
at async Promise.all (index 2)
at async respond (file:///Users/shivammeena/WebstormProjects/hege-admin/build/server/index.js:3123:23)
Beta Was this translation helpful? Give feedback.
All reactions