有人能告诉我为什么我不能在开发服务器上启动我的网站项目吗?
我已经在 Windows 10 上克隆了一个文件,这曾经在我的 Mac OS 上运行良好......在它死之前:'(随意尝试这个项目:https ://github.com/EMDevelop/j2c
当我运行时npm start
,我收到以下消息
> just2connect@0.1.0 start C:\Users\Ed\Desktop\Coding\React\j2c
> craco start
'craco' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! just2connect@0.1.0 start: `craco start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the just2connect@0.1.0 start 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\Ed\AppData\Roaming\npm-cache\_logs\2021-03-26T16_11_19_513Z-debug.log
这很奇怪,因为我有"craco": "0.0.3"
一个依赖项,并且"start": "craco start"
作为我的package.json
.
我craco.config
在项目中也有文件,@craco
文件夹中有node_modules
文件夹。
然后当我尝试再次安装 craco ( npm i @craco/craco
) 并运行npm start
时,我收到以下错误,要求我安装依赖项:
C:\Users\Ed\Desktop\Coding\React\j2c>npm i @craco/craco
npm WARN bootstrap@4.6.0 requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.
npm WARN radium@0.25.2 requires a peer of react@^15.3.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-coverflow@0.2.20 requires a peer of react@^16.5.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-elements@3.2.0 requires a peer of react-native-vector-icons@>7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-elements@3.2.0 requires a peer of react-native-safe-area-context@^3.1.9 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-ratings@7.3.0 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-size-matters@0.3.1 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
npm WARN react-only-when@1.0.2 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-only-when@1.0.2 requires a peer of react-dom@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-particles-js@3.4.1 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-swipeable@5.5.1 requires a peer of react@^16.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN react-testimonial@1.0.0 requires a peer of react@^16.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.20.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! code EEXIST
npm ERR! path C:\Users\Ed\Desktop\Coding\React\j2c\node_modules\.bin\craco
npm ERR! Refusing to delete C:\Users\Ed\Desktop\Coding\React\j2c\node_modules\.bin\craco: is outside C:\Users\Ed\Desktop\Coding\React\j2c\node_modules\@craco\craco and not a link
npm ERR! File exists: C:\Users\Ed\Desktop\Coding\React\j2c\node_modules\.bin\craco
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ed\AppData\Roaming\npm-cache\_logs\2021-03-26T16_29_51_457Z-debug.log
这也很奇怪,因为node_modules
我在文件夹(和)中有大部分依赖项package.json
:
我担心只是鲁莽地强迫 craco 替换旧版本,然后我是否必须对它给我警告的每个依赖项都这样做?大多数依赖项已经存在。
然后,当我再次尝试运行npm start
时,它给了我错误,就好像我再也没有安装过 craco 一样:
C:\Users\Ed\Desktop\Coding\React\j2c>npm start
> just2connect@0.1.0 start C:\Users\Ed\Desktop\Coding\React\j2c
> craco start
'craco' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! just2connect@0.1.0 start: `craco start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the just2connect@0.1.0 start 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\Ed\AppData\Roaming\npm-cache\_logs\2021-03-26T16_30_25_218Z-debug.log
任何帮助将不胜感激!!拔掉头发,我是 Windows 新手。