moecube icon indicating copy to clipboard operation
moecube copied to clipboard

build in webstorm

Open dalekzhangdong opened this issue 6 years ago • 4 comments

Hi gays , I'm newer, I git clone this project and import it in webstrom, webstrom remind me npm install , then I clink it , webstrom shows me below things like this , did I something wrong;

D:\Projects\xx\moecube\moecube\node_modules\raw-socket>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp \bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Users\hellen\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:978:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5) gyp ERR! System Windows_NT 10.0.17134 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\Projects\xx\moecube\moecube\node_modules\raw-socket gyp ERR! node -v v11.2.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\7zip-bin-linux): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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\hellen\AppData\Roaming\npm-cache_logs\2018-11-25T08_22_56_415Z-debug.log

Process finished with exit code 1

dalekzhangdong avatar Nov 25 '18 08:11 dalekzhangdong

I fix this probem uninstall python 3.7 and install python 2.7. but I still have other problem about \moecube\moecube\node_modules\raw-socket\node_modules\nan\nan_maybe_43_inl.h(88): error C2039: “ForceSet”: 不是“v8::Object”的成员

dalekzhangdong avatar Nov 25 '18 09:11 dalekzhangdong

Start PowerShell as Administrator and run:

npm install --global windows-build-tools

then run npm install again.

Zayelion avatar Nov 25 '18 19:11 Zayelion

I run this commend and get some error yet; like below

Windows PowerShell 版权所有 (C) Microsoft Corporation。保留所有权利。

PS C:\WINDOWS\system32> npm install --global windows-build-tools

[email protected] postinstall C:\Users\hellen\AppData\Roaming\npm\node_modules\windows-build-tools node ./dist/index.js

Downloading python-2.7.15.amd64.msi Error: read ECONNRESET Downloading Python failed. Error: { Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:139:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } windows-build-tools will now exit. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: node ./dist/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall 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\hellen\AppData\Roaming\npm-cache_logs\2018-11-26T02_04_07_769Z-debug.log PS C:\WINDOWS\system32>

dalekzhangdong avatar Nov 26 '18 02:11 dalekzhangdong

Make sure you have internet access while this is running... If you do then that means a URL it hit is dead. Basically you need specific things compiled with node_gyp and Visual Studio to run correctly.

Zayelion avatar Nov 26 '18 20:11 Zayelion