美文网首页
安装nodejs依赖

安装nodejs依赖

作者: 凡星_ | 来源:发表于2020-05-23 16:30 被阅读0次

    完成上面的js文件编写后,接下来就是在xiaowei-app目录中执行npm install安装依赖模块

    `

    npm install

    `

    这样它就会根据我们之前的package.json的设置安装相关模块

    如果出现以下错误

    `

    gyp ERR! find VS

    gyp ERR! find VS msvs_version not set from command line or npm config

    gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt

    gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer

    gyp ERR! find VS looking for Visual Studio 2015

    gyp ERR! find VS - not found

    gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8

    gyp ERR! find VS

    gyp ERR! find VS **************************************************************

    gyp ERR! find VS You need to install the latest version of Visual Studio

    gyp ERR! find VS including the "Desktop development with C++" workload.

    gyp ERR! find VS For more information consult the documentation at:

    gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows

    gyp ERR! find VS **************************************************************

    `

    则需要先安装Visual Studio和node-gyp

    先以管理员的身份打开CMD,然后执行命令安装Visual Studio

    `

    npm install -g node-gyp

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

    `

    最后可能会提示这个提醒,这个不需要管它

    `

    npm WARN fabcar@1.0.0 No repository field.

    `

    本文由小韦云原创,转载请注明出处:https://www.bctos.cn/doc/4/1826,否则追究其法律责任

    相关文章

      网友评论

          本文标题:安装nodejs依赖

          本文链接:https://www.haomeiwen.com/subject/zpklahtx.html