gpt4 book ai didi

sails.js - 在 Sails 应用程序中运行 npm install odbc 会产生错误吗?

转载 作者:行者123 更新时间:2023-12-04 21:10:02 25 4
gpt4 key购买 nike

我正在尝试安装 node-odbc包 ( https://github.com/wankdanker/node-odbc ) 在我的 Sails 应用程序中。

根据文档,我已经在服务器上安装并配置了 unixobdc,但是当我这样做时 npm 安装 odbc --save 在应用程序目录中,我收到以下错误:

npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Cannot set property 'waterline-criteria' of undefined npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! *LINK{//github.com/npm/npm/issues} npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Cannot set property 'waterline-cursor' of undefined npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! *LINK{//github.com/npm/npm/issues} npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Cannot set property 'waterline-errors' of undefined npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! *LINK{//github.com/npm/npm/issues}

npm ERR! Please include the following file with any support request: npm ERR! /var/www/sails.dev/secApp/npm-debug.log



关于为什么会这样或如何让这个包在 Sails 中工作的任何想法?

最佳答案

尝试这个:

删除应用程序目录中的 node_modules 文件夹。

从您的应用程序目录中运行以下命令:

npm install odbc --save;

我怀疑您的应用程序 NPM 安装出现问题,因此您只需在添加新包时刷新它。

关于sails.js - 在 Sails 应用程序中运行 npm install odbc 会产生错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36925149/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com