我只想集成Django Reatcjs,但是当我运行“ npm run build”时,就会发生此错误。
但是魔术是当我仅构建reactJs项目时,它将构建该项目。
但是使用Django无法运行。
我希望有人已经找到了解决问题的方法。
'ReactJs\djangoReactJs\reactapp\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'E:\python project\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Flash\AppData\Roaming\npm-cache\_logs\2020-04-23T06_27_42_378Z-debug.log