Asgarrrr / Luna

An adorable discord bot fully customizable created in javascript, using Discord.js and mongoDB that is constantly growing !
https://lunadoc.vercel.app/
GNU General Public License v3.0
24 stars 3 forks source link

Help Me,i Can't install Discord.js #27

Closed NaturalDev closed 3 years ago

NaturalDev commented 3 years ago

Help Me,i Can't install Discord.js

npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.2.0 | win32 | x64 npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: C:\Program Files\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "", line 1 npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack ^ npm ERR! gyp ERR! stack SyntaxError: invalid syntax npm ERR! gyp ERR! stack npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:326:12) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) npm ERR! gyp ERR! System Windows_NT 10.0.19041 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\censored\Dropbox\Il mio PC (DESKTOP-UPMFOB5)\Desktop\Dixie\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\censored\Dropbox\Il mio PC (DESKTOP-UPMFOB5)\Desktop\Dixie\node_modules\erlpack npm ERR! gyp ERR! node -v v16.2.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok

Asgarrrr commented 3 years ago

Hi !

The installation of Discord.js requires node-gyp, which itself requires :

Install the current version of Python from the Microsoft Store package.

Install tools and configuration manually:

Configuring Python Dependency

node-gyp requires that you have installed a compatible version of Python, one of: v3.6, v3.7, v3.8, or v3.9. If you have multiple Python versions installed, you can identify which Python version node-gyp should use in one of the following ways:

  1. by setting the --python command-line option, e.g.:
node-gyp <command> --python /path/to/executable/python
  1. If node-gyp is called by way of npm, and you have multiple versions of Python installed, then you can set npm's 'python' config key to the appropriate value:
npm config set python /path/to/executable/python
  1. If the PYTHON environment variable is set to the path of a Python executable, then that version will be used, if it is a compatible version.

  2. If the NODE_GYP_FORCE_PYTHON environment variable is set to the path of a Python executable, it will be used instead of any of the other configured or builtin Python search paths. If it's not a compatible version, no further searching will be done.