执行npm install marialsql时抛出错误

时间:2017-12-22 05:14:44

标签: node.js angular npm mariasql

我需要你帮助解决以下错误。

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

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

  

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

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

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

  

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

     

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

     

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

0 个答案:

没有答案