我是PHP开发人员,现在我想用Mean.io构建项目。并在命令行中遇到一些错误,任何人都可以帮助我摆脱这些错误,或者让我知道为什么出现这些错误。我安装了node.js,git和python。
我写了以下命令。
$ git clone https://github.com/linnovate/mean.git
$ cd mean
$ npm install && npm start
以下错误显示在CMD中。
Binary has a problem: Error: %1 is not a valid Win32 application.
\?D:meannode_modulesnode-sassvendorwin32-ia32-57binding.node
erb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:meannode_moduleswhichwhich.js:13:12)
gyp verb `which` failed at F (D:meannode_moduleswhichwhich.js:68:19)
gyp verb `which` failed at E (D:meannode_moduleswhichwhich.js:80:29)
gyp verb `which` failed at D:meannode_moduleswhichwhich.js:89:16
gyp verb `which` failed at D:meannode_modulesisexeindex.js:42:5
gyp verb `which` failed at D:meannode_modulesisexewindows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
i解决了问题,此问题是由于Node.js的旧版本造成的。我正在发布答案以帮助他人。我的操作系统是窗口10-64位,我删除了node.js 32位并安装了更新的64位版本的node.js,然后运行命令
$ git clone https://github.com/linnovate/mean.git
$ cd mean
$ npm install && npm start
我发现没有错误。现在的平均值正常运行。