Open AnshuBansal6 opened 4 months ago
"process is not defined" is maybe come from some dependencies having code checking process.env.NODE_ENV
. This is a common practice in many libraries, for example Vue. Many bundlers support this convention in order to support tree shaking React's style of exporting dev/prod modules depending on the environment.
You can probably find your define
feature of the bundler and define process.env.NODE_ENV
as "production"
to solve this issue.
"Module parse failed: Unexpected token" is because your bundler did not recognize the 2 new syntaxes of JavaScript:
a?.b
Optional chaining released in ES2020class { foo = bar }
Public class fields released in ES2022You need to upgrade your tooling. I believe webpack has supported ES2022.
Any one please help to fix this error?
Uncaught ReferenceError: process is not defined at 4043 (:2:13168)
at r (:2:306599)
at 8048 (:2:9496)
at r (:2:306599)
at 8641 (:2:1379)
at r (:2:306599)
at :2:315627
at :2:324225
at :2:324229
at e.onload (common_app.chunk.js:158268:370943)
common_app.chunk.js:158268 ./node_modules/@netless/synced-store/node_modules/value-enhancer/dist/index.js 27:29
Module parse failed: Unexpected token (27:29)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| };
| var INIT_VALUE = {};