'User'不被识别为内部或外部命令,"durring running npm start"



请帮助解决这个错误,我创建了新的react项目,然后我运行npm startcmd,我得到这个错误。

C:Rachnap-16 working with Form & User Input using http requestuser-input-project>npm start

> user-input-project@0.1.0 start
> react-scripts start

'User' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module 'C:Rachnareact-scriptsbinreact-scripts.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

问题是您的路径名中有一个&:
C:Rachnap-16 working with Form & User Input using http requestuser-input-project>npm start

阅读这个StackOverflow答案了解更多。作为解决方案,请停止服务器,然后尝试将路径名中的&替换为其他内容,例如and。之后,它应该可以正常工作。

最新更新