Closed NaturalDev closed 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:
Launch cmd, npm config set msvs_version 2017
If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.
To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".
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:
--python
command-line option, e.g.:node-gyp <command> --python /path/to/executable/python
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
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.
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.
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