Не могу установить лучше-sqlite3 discord.js - PullRequest
0 голосов
/ 25 мая 2019

Я не могу установить лучше-sqlite3 Я просто переустановил Windows 10 на моем компьютере, и я установил все (git, node.js, node-gyp) и все такое При попытке установить лучше-sqlite3, он показывает это


> better-sqlite3@5.4.0 install C:\Users\andre\Escritorio\dev\discordbot\node_modules\better-sqlite3
> node-gyp rebuild


C:\Users\andre\Escritorio\dev\discordbot\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 ) 
Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m".
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: No se p
ueden encontrar las herramientas de compilación para v140 (Conjunto de herramientas de la plataforma = 'v140'). Para compilar con las herramientas d
e compilación v140, instale las herramientas de compilación v140. También puede actualizar a las herramientas actuales de Visual Studio. Para ello,  
seleccione el menú Proyecto o haga clic con el botón secundario en la solución y, a continuación, seleccione "Actualizar solución". [C:\Users\andre\ 
Escritorio\dev\discordbot\node_modules\better-sqlite3\build\deps\locate_sqlite3.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
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\andre\Escritorio\dev\discordbot\node_modules\better-sqlite3
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN discord.js@11.5.0 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN enmap@4.8.4 requires a peer of better-sqlite-pool@github:eslachance/better-sqlite-pool but none is installed. You must install peer dependencies yourself.
npm WARN discordbot@ No description
npm WARN discordbot@ No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@5.4.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@5.4.0 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\andre\AppData\Roaming\npm-cache\_logs\2019-05-25T14_42_59_404Z-debug.log

1 Ответ

0 голосов
/ 25 мая 2019

Добавьте это в файл package.json, а затем проверьте, работает ли он

{

"main": "index.js", "зависимость": { "лучше-sqlite3": "5.4.0" } }

...