You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have migrated our react scripts from 4.0.3 to 5.0.0, since migration we are not able to load the web client
We are getting some run time issue where the application is failing to load due to the following error...
main.js:78 Uncaught ReferenceError: process is not defined
at Object.config (main.js:78:1)
at Module../src/index.jsx (index.jsx:8:1)
at Module.options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at startup:7:1
at startup:7:1
config @ main.js:78
./src/index.jsx @ index.jsx:8
options.factory @ react refresh:6
webpack_require @ bootstrap:24
(anonymous) @ startup:7
(anonymous) @ startup:7
In Main.js, failing @ line no: 2
// Populates process.env from .env file
function config (options /*: ?DotenvConfigOptions /) /: DotenvConfigOutput */ {
let dotenvPath = path.resolve(process.cwd(), '.env') ----------------------------------> Failing here
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
We have migrated our react scripts from 4.0.3 to 5.0.0, since migration we are not able to load the web client
We are getting some run time issue where the application is failing to load due to the following error...
main.js:78 Uncaught ReferenceError: process is not defined
at Object.config (main.js:78:1)
at Module../src/index.jsx (index.jsx:8:1)
at Module.options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at startup:7:1
at startup:7:1
config @ main.js:78
./src/index.jsx @ index.jsx:8
options.factory @ react refresh:6
webpack_require @ bootstrap:24
(anonymous) @ startup:7
(anonymous) @ startup:7
In Main.js, failing @ line no: 2
// Populates process.env from .env file
package.json:
"dotenv": "^8.2.0",
"immutable": "^4.0.0-rc.12",
"jest-watch-typeahead": "^0.6.5",
"jwt-decode": "^2.2.0",
"path-browserify": "^1.0.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-scripts": "^5.0.0"
We are not getting any clue on what is going wrong. can someone please help me in resolving this issue?
Beta Was this translation helpful? Give feedback.
All reactions