node.js - 无法安装sequelize NPM node_modules/.sequelize.DELETE/node_modules/debug
问题描述
我是 NodeJS 的新手,想使用 Sequelize。
我在一个新的 CentOS7 VM 上安装了 PostgreSQL 和 Node。
node -v v10.14.1
npm -v v6.5.0
当我尝试安装sequelize
[vmuser@accounts-1 accounts-nodejs]$ npm install --save sequelize
npm ERR! path /mnt/hgfs/vms_shared/dev/accounts-nodejs/node_modules/.sequelize.DELETE/node_modules/debug
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/hgfs/vms_shared/dev/accounts-nodejs/node_modules/.sequelize.DELETE/node_modules/debug' -> '/mnt/hgfs/vms_shared/dev/accounts-nodejs/node_modules/sequelize/node_modules/debug'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vmuser/.npm/_logs/2018-12-12T15_42_17_715Z-debug.log
解决方案
可能是因为你没有 package.json 文件。该--save
标志指示 npm 将其保存为 package.json 中的依赖项。因此,首先运行npm init
它是一个交互式命令行进程。然后安装sequelize
推荐阅读
- xamarin - 如何查询子元素,存在于列表项中
- c++ - 未定义对“Mosaic::Mosaic()”的引用
- vba - GetSharedDefaultFolder - 子文件夹访问错误
- postgresql - Odoo 13 无法连接到 PostgreSQL 10.5
- flutter - TextFormField颤动上没有小数分隔符的千位分隔符
- c++ - QT5 蓝牙 - 定期扫描会冻结程序
- matlab - 命令窗口应答格式
- javascript - 使用扩展运算符时如何防止 Redux 上的重复?
- woocommerce - Woocommerce 多域映射
- java - JCEF:CefApp 处置和重启