Skip to content

Conversation

@JavaLeb
Copy link

@JavaLeb JavaLeb commented Aug 5, 2025

Description

    I added "cross-env" to the package.json file to support cross-environment functionality.

When I run the front-end program independently on Windows, a problem has arisen, see:

E:\git_project\DB-GPT\web>npm run dev

[email protected] dev
NODE_OPTIONS=--max_old_space_size=8192 next dev

'NODE_OPTIONS' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

How Has This Been Tested?

    You should install the cross-env first, cmd:

npm install --save-dev cross-env

now you can run the following commad:


npm run dev

Snapshots:


"scripts": {
"start": "cross-env NODE_OPTIONS=--max_old_space_size=8192 next start",
"dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 next dev",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 next build",
"build:prod": "cross-env APP_ENV=prod NODE_OPTIONS=--max_old_space_size=8192 next build",
"lint": "eslint '/*.{ts,tsx}' --fix",
"format": "prettier --write '
/*.{ts,tsx}'",
"export": "next export",
"compile": "cross-env NODE_OPTIONS=--max_old_space_size=8192 next build && next export"
}

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant