Npm install error related to python

Hi there,

I read the other threads about problems people were having and how they solved them to no avail. I tried running ‘npm start’ regardless of the errors, but no luck there. I get:

$ npm start

> server@1.0.0 start C:\Users\jual\Desktop\mflix-js
> nodemon -L ./index.js

[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./index.js`
(node:9108) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.
MongoNetworkError: failed to connect to server [] on first connect [MongoNetworkError: connection 5 to closed]
    at Pool.<anonymous> (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\topologies\server.js:431:11)
    at Pool.emit (events.js:198:13)
    at connect (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\connection\pool.js:580:14)
    at callback (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\connection\connect.js:109:5)
    at runCommand (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\connection\connect.js:129:7)
    at Connection.errorHandler (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\connection\connect.js:321:5)
    at Object.onceWrapper (events.js:286:20)
    at Connection.emit (events.js:198:13)
    at TLSSocket.<anonymous> (C:\Users\jual\Desktop\mflix-js\node_modules\mongodb\lib\core\connection\connection.js:350:12)
    at Object.onceWrapper (events.js:286:20)
[nodemon] app crashed - waiting for file changes before starting...

Here’s the error I get with npm install:

$ npm install

> weak-napi@1.0.3 install C:\Users\<myusername>\Desktop\mflix-js\node_modules\weak-napi
> node-gyp rebuild

<myusername>@<myusername>3 C:\Users\<myusername>\Desktop\mflix-js\node_modules\weak-napi
$ 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\<myusername>\AppData\Local\Programs\Python\Python37-32\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:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17763
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 C:\Users\<myusername>\Desktop\mflix-js\node_modules\weak-napi
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN eslint-config-react-app@2.1.0 requires a peer of babel-eslint@^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@2.1.0 requires a peer of eslint-plugin-jsx-a11y@^5.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN server@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<myusername>\AppData\Roaming\npm-cache\_logs\2019-09-19T09_00_59_870Z-debug.log

I have renamed the environment file to ‘.env’ and written there my Atlas Cluster address (also have created the user & password in my cluster as indicated).

Do I need a lower version of python to build this project? I got:
Python 3.7.3
Node v10.16.0


Are you able to connect to your cluster from your system? If no, it might be firewall issue.
But if you are able to connect, then please check your .env file for URI issues. Share the configuration file here so that we can look.

This is expected and don’t worry about this.