ZhangMYihua / graphql-lesson

We are starting our Graphql implementation lesson! In this lesson, we are starting from a state of our application where we don't have sagas but are leveraging redux for local state storage.
8 stars 271 forks source link

node-gyp error pls myihua help me!!! #31

Open andria21 opened 2 years ago

andria21 commented 2 years ago

gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\andria\Desktop\graphql-lesson-master\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\andria\Desktop\graphql-lesson-master\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" gyp ERR! cwd C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc gyp ERR! node -v v16.13.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\andria\Desktop\graphql-lesson-master\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28) node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) node-pre-gyp ERR! System Windows_NT 10.0.19042 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc node-pre-gyp ERR! node -v v16.13.0 node-pre-gyp ERR! node-pre-gyp -v v0.13.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\andria\Desktop\graphql-lesson-master\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\andria\Desktop\graphql-lesson-master\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0

jonyahmed19 commented 2 years ago

I am also facing this problem. How can I fix it

crazyoptimist commented 2 years ago

https://github.com/CrazyOptimist/crown-clothing-react/tree/feature/context-api Starting from this branch will work as of right now. My graphql branch is: https://github.com/CrazyOptimist/crown-clothing-react/tree/feature/graphql-apollo

nelson2411 commented 2 years ago

Don't you use: proxy: http://localhost:5000 ?

crazyoptimist commented 2 years ago

No, I don't use any proxy config.

nelson2411 commented 2 years ago

Thank you for sharing this, a lot of students are facing the same issue. I am testing it now. One question, can you follow along the tutorial with these versions of the libraries?

crazyoptimist commented 2 years ago

Node.js and React have been much evolved since this repo was created. I think we should use the latest versions of them for the course. I don't have time to follow along but will try to help if I get time later.

nelson2411 commented 2 years ago

Thank you 👍 , What I mean is that if it is possible to watch the videos in the course with these libraries' versions?

crazyoptimist commented 2 years ago

No problem. You can still use the legacy approach in the current video of the course. But, I'd rather ask @ZhangMYihua to update the Graphql part of the course with the latest React version and libs using hooks instead of deprecated legacy approches :)