安装react-paypal-button时出现npm错误

时间:2019-04-14 00:15:26

标签: node.js

我正在尝试为我正在研究的项目安装react-paypal-button

但是当我执行npm install react-paypal-button@2.0.3时,我最终会收到此错误

C:\Users\ryan1\Downloads\Capstone\Ovals>npm install react-paypal-button@2.0.3

> react-paypal-button@2.0.3 preinstall 

C:\Users\ryan1\Downloads\Capstone\Ovals\node_modules\react-paypal-button

> rm -rf dist

'rm' is not recognized as an internal or external command,

operable program or batch file.

npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\ryan1\Downloads\Capstone\Ovals\node_modules\chokidar\node_modules\fsevents\node_modules'

npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

npm WARN react-async-script-loader@0.3.0 requires a peer of react@^15.5.4 but none is installed. You must install peer dependencies yourself.

npm WARN ts-pnp@1.0.1 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\chokidar\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! react-paypal-button@2.0.3 preinstall: `rm -rf dist`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the react-paypal-button@2.0.3 preinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional 
logging output above.

如果有人知道如何解决它,这将是一个很好的帮助代码

1 个答案:

答案 0 :(得分:0)

问题出在以下命令:rm -rf dist

'rm' is not recognized as an internal or external command

按照this link安装react-paypal-button。

也请看一下dist-tag rm