postgrator:迁移postgresql数据库时找不到

问题描述

错误:

<input type="text" id="txt" onkeyup="fnSingleValue(this)"/>
回购中已安装

postgrator-cli版本4.0.0,运行$ heroku run npm run migrate Running npm run migrate on ⬢ shelly-moth-73910... up,run.3979 (Free) > [email protected] migrate /app > postgrator --config postgrator-config.js sh: 1: postgrator: not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! [email protected] migrate: `postgrator --config postgrator-config.js` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] migrate 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! /app/.npm/_logs/2020-09-06T07_52_36_217Z-debug.log 告诉我。但是在我推送到heroku之后,好像postgrator不存在了。 npm list postgrator-cli和其他此类命令不变,heroku run npm install postgrator-cli返回:

heroku run npm list postgrator-cli

这是我的$ heroku run npm list postgrator-cli Running npm list postgrator-cli on ⬢ rocky-garden-73910... up,run.7024 (Free) [email protected] /app `-- (empty)

postgrator-config.js

Procfile包含require('dotenv').config(); module.exports = { 'migrationsDirectory': 'migrations','driver': 'pg','connectionString': process.env.NODE_ENV === 'test' ? process.env.TEST_DATABASE_URL : process.env.DATABASE_URL,'ssl': !!process.env.SSL,};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)