The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

311243 (5) [Avatar] Offline
#1
Using npm version 6.4.1
Using node version 10.4.0
Windows 10


I don't do much with node, so I may doing something obviously stupid. I downloaded the zip file from git and unpacked it. When I went into the letters-social-master directory and typed npm install, I got the following errors. Can someone clue me in to what might be going on?



PS E:\ReactInAction\letters-social-master> npm install

> grpc@1.7.3 install E:\ReactInAction\letters-social-master\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.3 and node@10.4.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.3 and node@10.4.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\ssinai\Anaconda3\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", 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:291:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "E:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ssinai\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=E:\\ReactInAction\\letters-social-master\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\ReactInAction\\letters-social-master\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd E:\ReactInAction\letters-social-master\node_modules\grpc
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR!gyp  stackERR! Error: Failed to execute 'E:\Program Files\nodejs\node.exe C:\Users\ssinai\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\ReactInAction\letters-social-master\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\ReactInAction\letters-social-master\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
 node-pre-gypconfigure error
ERR! stack     at ChildProcess.<anonymous> (E:\ReactInAction\letters-social-master\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gypgyp  ERR!ERR!  stackstack Error: Command failed: C:\Users\ssinai\Anaconda3\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
     at ChildProcess.emit (events.js:182:13)
gypnode-pre-gyp  ERR!ERR!  stack     at maybeClose (internal/child_process.js:961:16)
stacknode-pre-gyp   File "<string>", line 1
gyp  ERR!ERR!  stackstack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
     import sys; print "%s.%s.%s" % sys.version_info[:3];
node-pre-gypgyp  ERR!ERR!  Systemstack Windows_NT 10.0.17134
                                ^
node-pre-gypgyp  ERR!ERR!  command "E:\\Program Files\\nodejs\\node.exe" "E:\\ReactInAction\\letters-social-master\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
stacknode-pre-gyp SyntaxError: invalid syntax
 gyp ERR!ERR!  cwdstack E:\ReactInAction\letters-social-master\node_modules\grpc

node-pre-gypgyp  ERR!ERR!  node -v v10.4.0
stacknode-pre-gyp     at ChildProcess.exithandler (child_process.js:291:12)
 gypERR!  ERR!node-pre-gyp -v  v0.6.39
stacknode-pre-gyp     at ChildProcess.emit (events.js:182:13)
 gypERR!  ERR!not ok
stack     at maybeClose (internal/child_process.js:961:16)
gyp ERR! stackFailed to execute 'E:\Program Files\nodejs\node.exe C:\Users\ssinai\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=E:\ReactInAction\letters-social-master\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=E:\ReactInAction\letters-social-master\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "E:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ssinai\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=E:\\ReactInAction\\letters-social-master\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=E:\\ReactInAction\\letters-social-master\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd E:\ReactInAction\letters-social-master\node_modules\grpc
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.7.3 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\ssinai\AppData\Roaming\npm-cache\_logs\2018-12-11T09_49_04_939Z-debug.log
PS E:\ReactInAction\letters-social-master>
311243 (5) [Avatar] Offline
#2
I was able to get rid of the error messages by uninstalling node v10 and installing node v8. Unfortunately, that screws up some other applications I've built with later versions of node. I suppose I'll have to try to figure out node version manager (nvm).
mark (60) [Avatar] Offline
#3
hey! Sorry for the trouble with node versions. Node 10 recently went LTS, and to keep things standard we'll only support LTS versions. So we'll need to get it up to date but till then I would suggest using 8 as it's broadly supported. nvm is a great version manager for node, it's what I've used for a while now and I've loved it. Let me know if you have any other questions or if you're interested in opening a PR to update the code to handle node 10