npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.17 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.27-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "--save-exact" "react" "react-dom" "react-scripts"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/app/my-react/my-react/node_modules/.bin/acorn'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-05-13T06_51_16_623Z-debug.log
Aborting installation.
npm install --save --save-exact react react-dom react-scripts has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting my-react/ from /app/my-react
Done.
全局安装了create-react-app 但是创建项目的时候失败
root@f60522de5dd6:/app# npm -v
4.2.0
root@f60522de5dd6:/app# node -v
v7.10.0
最后 我发现这个问题只存在我用docker虚拟机的时候,最后在windows下安装就没问题了。