Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue #164

Closed
rodrigorcalamo opened this issue Sep 9, 2018 · 10 comments
Closed

Installation Issue #164

rodrigorcalamo opened this issue Sep 9, 2018 · 10 comments

Comments

@rodrigorcalamo
Copy link

My OS is Windows 10

I got a issue on installation of better-sqlite3, if someone can helps me, i would be appreciated.

`PS C:\Users\rodri\Desktop\Wild Arena BOT> npm install --save better-sqlite3

better-sqlite3@4.1.4 install C:\Users\rodri\Desktop\Wild Arena BOT\node_modules\better-sqlite3
node-gyp rebuild

C:\Users\rodri\Desktop\Wild Arena BOT\node_modules\better-sqlite3>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 )
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 538, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 514, in gyp_main
options.duplicate_basename_check)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1916, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
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\rodri\Desktop\Wild Arena BOT\node_modules\better-sqlite3
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN discord.js@11.4.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.4.2 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN smartstakersbot@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@4.1.4 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@4.1.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rodri\AppData\Roaming\npm-cache_logs\2018-09-09T15_16_33_957Z-debug.log`

@SummitCollie
Copy link

SummitCollie commented Sep 20, 2018

Same thing here.

Node v10.10.0
NPM v6.4.1

edit: I'm a big stupidhead and didn't look at the troubleshooting section

@yw662
Copy link

yw662 commented Sep 21, 2018

versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'

according to that line,
Do you have any visual studio installed?

@JoshuaWise
Copy link
Member

After doing a google search, I found this thread which seems to be talking about the same error message: nodejs/node-gyp#1144

Try following that thread to solve your issue, and report back here whether the thread was helpful.

@jbrown123
Copy link

jbrown123 commented Sep 27, 2018

I found that there are problems with installing this because node-gyp REQUIRES the v140 visual studio tools. I finally found a solution that worked for me (I'm on Win 10).

npm install --global --production windows-build-tools --vs2015

The --vs2015 is critical because it forces the v140 tool set to be installed. I figured this out from a variety of sources, but in particular @npk48 comments here pointed me in the right direction.

@JoshuaWise
Copy link
Member

@TheBoss0001 did @jbrown123's suggestion work for you?

@JoshuaWise
Copy link
Member

Closing this due to unresponsiveness.

@mceachen
Copy link
Member

@JoshuaWise thanks for the tips. I found I needed to install both vs2015 and the latest default (vs2017) to get all my native deps to compile. See #170 (comment)

@Custardcs
Copy link

I know this has been closed but spaces in your URL 'C:\Users\rodri\Desktop\Wild Arena BOT' have also been found to have a few issues with some people.

@mceachen
Copy link
Member

mceachen commented Jun 3, 2021

npm install --global --production windows-build-tools --vs2015

Hey, i can't also install this.

Node.js now comes with build tools which should make compilation "just work," but you need to use a newer version, and make sure you opt-in to the installation of chocolatey and related tooling.

Try reinstalling node 14 or node 16, and click this checkbox when you see it:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants
@mceachen @jbrown123 @JoshuaWise @Custardcs @yw662 @SummitCollie @rodrigorcalamo and others