Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在windows 10 环境下运行出错,错误信息和修改步骤如下:
一、执行npm install 出现错误,错误信息如下:
--------------------- 错误信息开始 -------------------------------->>>
audited 14774 packages in 5.586s
found 1 moderate severity vulnerability
run
npm audit fix
to fix them, ornpm audit
for details----------------------- 错误信息结束 ---------------------------------------------------------------<<<
1、 按照提示执行 npm audit fix,
2、 然后再执行 npm install 问题解决。
二、执行 npm start 出现错误:
----------------------- 错误信息开始 ------------------------------------------>>>
'NODE_ENV' 不是内部或外部命令,也不是可运行的程序。
-------------------------错误信息结束 --------------------------------------------<<<
1、 首先安装cross-env,执行 npm install cross-env --save-dev ;
2、 然后执行 npm install;
3、 修改 package.json 文件,在start 前面添加 cross-env ;
4、最后,执行 npm start
正常启动!
cross-env的强大之处就在于不同系统下可使用唯一的指令,无需担心跨平台问题。