1

我需要您的帮助来解决以下错误。

我正在尝试使用 mariasql 构建一个角度项目,因为它是后端数据库

为了做到这一点:我尝试了以下步骤

步骤 1:我使用以下命令行安装了 windows 生产工具,因为 maria db 需要 Microsoft Visual Studio 编译器

`"npm install --global windows-build-tools"`

在第 1 步之后,当我安装全局 windows 构建工具时,我的笔记本电脑中有 Visual Studio 和 python 2.7

第 2 步:我在系统中设置 PYTHON环境变量

第 3 步:我创建了一个全新的 Angular 项目,如下所示

ng new selenium-package

该项目是使用 node_modules 创建的

第 4 步:我尝试如下安装 marialsql

npm install mariasql

有了这个,我得到以下错误:

 C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql> if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js" rebuild ) module.js:557
        throw err;
    ^

Error: Cannot find module 'C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql\node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:618:3 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mariasql@0.2.6 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mariasql@0.2.6 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\Jack\AppData\Roaming\npm-cache\_logs\2017-12-22T04_49_00_804Z-debug.log
4

0 回答 0