Error: env [NODE_ENV] is not set
Encountered problem: running project reports error: env [node_env] is not set
Screenshot of the problem:
Solution idea, env in NODE_ENV is not set, resulting in process failure, so you can set the value of this NODE_ENV can be solved. Because it is someone else’s project, I took it over directly, so I searched NODE_ENV globally and found that NODE_ENV=development, so just set NODE_ENV to development.
1. For Linux:
NODE_ENV=development node foo.js
2. For Windows
Write node foo according to the actual needs of the project JS, some projects can not be written
It is possible that in addition to the property NODE_ENV is not set, there are other values that are not set, for the same reason, you can set the corresponding value for this value
- How to Solve Error: “initializer element is not constant”
- How to Solve jQuery error: Uncaught ReferenceError: $ is not defined
- How to Solve HBase error: region is not online
- [Solved] Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables. Valid values are “development”, “test”, and “production”. Instead, received: undefined.
- [Solved] npm Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
- How to Solve Pandas Error: nested renamer is not supported python
- How to Solve Element Error: target is not existed: .page-component__scroll .el-scrollbar__wrap
- How to Solve VMware Workstation Error: The VMware Authorization Service is not running.
- Springboot connects to the database error: testWhileIdle is true, validationQuery not set
- Django Error: ‘set‘ object is not reversible [How to Solve]
- How to Solve Error: Module did not self-register
- How to Solve VScode 2022 error: msvcp110d.dll not found
- How to Solve Cocos creator label text is too many error
- How to Solve Maven Error: Return code is: 501 , ReasonPhrase:HTTPS Required.
- How to Solve “Error db.num is null” when starting Nacos
- How to Solve Error: could not list the contents of folder
- How to Solve Error: homebrew-core is a shallow clone.
- How to Solve Error: IncompleteElementException: Could not find result map…
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode