对MAC不响应';你不能在WINDOWS上工作吗?
我用macbook创建了一个应用程序,在mac上运行良好。但我尝试在windows上运行相同的项目,但不起作用 当我运行:npm install时,我得到以下反馈:对MAC不响应';你不能在WINDOWS上工作吗?,windows,reactjs,git-bash,Windows,Reactjs,Git Bash,我用macbook创建了一个应用程序,在mac上运行良好。但我尝试在windows上运行相同的项目,但不起作用 当我运行:npm install时,我得到以下反馈: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.3 (node_modules\react-scripts\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
fsevents@^1.1.3 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
fsevents@^1.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:
Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
fsevents@^1.0.0 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3:
wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none was installed .
在我的package.json上,我有以下内容:
{
"name": "---",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-router": "^4.2.0",
"react-scripts": "^1.1.4",
"styled-components": "^2.4.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
我明白出于某种原因,我在操作系统之间存在不兼容,但这不应该发生,对吗
ps:我使用npx create react app my app创建了一个应用程序测试,并且运行正常!但是,为什么我目前的项目没有工作,为什么,天哪
ps2:我也尝试安装:npm I-f忽略警告但npm启动停止工作,我有相同的错误:
> react-scripts start
Could not find a required file.
Name: index.js
Searched in: D:\projetos\cesarcabral\portflio\src
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portflio@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portflio@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
额外信息:
- $node-v->v8.9.1
- $npm-v->5.8.0
- 似乎您需要安装
ajv
:
npm警告ajv-keywords@3.1.0需要ajv@^6.0.0的对等机,但未安装任何对等机
缺少
src/index.js
。嗨,加布里埃尔,谢谢你的回答……)已安装:“$npm安装ajv@^6.0.0 ajv”-keywords@3.1.0好的我再次运行:'$npm I>uglifyjs网页包-plugin@0.4.6postinstall D:\projetos\cesarcabral\portflio\node_modules\uglifyjs webpack plugin>node lib/post_install.js npm WARN可选跳过可选依赖项:fsevents@1.1.3(节点\u模块\fsevents):npm WARN notsup跳过可选依赖项:不支持的平台fsevents@1.1.3:通缉{“os”:“darwin”、“arch”:“any”}(当前:{“os”:“win32”、“arch”:“x64”})某些模块需要编译本机模块。如果要删除可选的依赖项警告,请删除package-lock.json和node_modules文件夹,并使用--no-optional进行安装