juzibot / wechaty-puppet-macpro

One puppet based on Mac WeChat for Wechaty.
Apache License 2.0
38 stars 10 forks source link

Install error "npm install wechaty-puppet-macpro" #55

Open littlepure2333 opened 4 years ago

littlepure2333 commented 4 years ago

My nodejs version is 10.16.0. My OS is Windows 10.

It all goes well in the first steps:

mkdir my-macpro-bot && cd my-macpro-bot
npm init -y
npm install wechaty@next
npm install qrcode-terminal

and the wechaty version shown is 0.29.52

but when I run the command
npm install wechaty-puppet-macpro There are some errors:

>npm install wechaty-puppet-macpro**
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
\> node-expat@2.3.18 install C:\Users\littlepure\git\my-macpro-bot\node_modules\node-expat
\> node-gyp rebuild
C:\Users\littlepure\git\my-macpro-bot\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Users\littlepure\scoop\apps\nodejs\10.16.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\littlepure\scoop\apps\nodejs\10.16.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Users\\littlepure\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\littlepure\\scoop\\apps\\nodejs\\10.16.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\littlepure\git\my-macpro-bot\node_modules\node-expat
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN ws@7.2.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN my-macpro-bot@1.0.0 No description
npm WARN my-macpro-bot@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-expat@2.3.18 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.18 install 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\littlepure\scoop\persist\nodejs\cache\_logs\2020-01-31T13_54_59_240Z-debug.log

Looks like there has problems about node-gyp, so I install the newest node-gyp(version6.1.0) manually. But when I rerun the command
npm install wechaty-puppet-macpro I got the same errors as before.

BTW, my nodejs is installed by scoop, which is a package manager in Windows.

su-chang commented 4 years ago

Please have a try by these commands.

npm install wechaty@0.29.41
npm install wechaty-puppet-macpro@next
littlepure2333 commented 4 years ago

Thanks for your advice @su-chang But there are still lots of problems during installation. Perhaps Windows is not a proper environment to develop. Then I retry in Ubuntu, and I install successfully in one time. So, for all guys want to use wechaty in Windows: If you have any problem, better to develop in Linux😅