Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams C:\Users\ASUS-X441M\Desktop\ReadMemoryJS\node_modules\memoryjs>if not defined npm_config_node_gyp (node "D:\Program Files\NodeJS\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\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:\Program Files (x86)\Python38-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:299:12) gyp ERR! stack at ChildProcess.emit (events.js:193:13) gyp ERR! stack at maybeClose (internal/child_process.js:999:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5) gyp ERR! System Windows_NT 10.0.18363 gyp ERR! command "D:\\Program Files\\NodeJS\\node.exe" "D:\\Program Files\\NodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\ASUS-X441M\Desktop\ReadMemoryJS\node_modules\memoryjs gyp ERR! node -v v11.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN eslint-config-airbnb-base@12.1.0 requires a peer of eslint@^4.9.0 but none is installed. You must install peer dependencies yourself. npm WARN bl@0.7.0 requires a peer of stream-browserify@* but none is installed. You must install peer dependencies yourself. npm WARN readmemoryjs@1.0.0 No description npm WARN readmemoryjs@1.0.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! memoryjs@3.2.3 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the memoryjs@3.2.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

How i fix this? i don't know what to do. help me

i want to install memoryjs.

NodeJS Version : v11.15.0

NPM Version: v6.7.0

OS: Windows 10 Enterpiese

Text Editor: VSCode

You are running Python 3.8 but that command is not valid in Python 3. It is valid in Python 2.

$ python2 -c 'import sys; print "%s.%s.%s" % sys.version_info[:3];'
2.7.15
$ python3 -c 'import sys; print "%s.%s.%s" % sys.version_info[:3];'
  File "<string>", line 1
    import sys; print "%s.%s.%s" % sys.version_info[:3];
SyntaxError: invalid syntax

Python 2 is old and unsupported and you should not use it. I notice you are also using Node.js 11 which is also unsupported (and may have used/required Python 2 in parts of its build chain).

So you have at least two options: Try specifying a Python 2 executable in your PYTHON environment variable or update to a supported version of Node.js. (As of this writing, Node.js 14 is the most recent LTS and is a good choice, all other things being equal.) I would recommend updating Node.js over using Python 2, but you can certainly try both.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.