Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in webstorm #15

Open
dalekzhangdong opened this issue Nov 25, 2018 · 4 comments
Open

build in webstorm #15

dalekzhangdong opened this issue Nov 25, 2018 · 4 comments

Comments

@dalekzhangdong
Copy link

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
Copy link
Author

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”的成员

@Zayelion
Copy link
Member

Zayelion commented Nov 25, 2018

Start PowerShell as Administrator and run:

npm install --global windows-build-tools

then run npm install again.

@dalekzhangdong
Copy link
Author

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>

@Zayelion
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants