typescript - 由于找不到 ts-node-dev,在 elasticbeanstalk 上运行 typescript 应用程序的问题
问题描述
在 EB 上似乎默认没有安装 ts-node-dev ,这很奇怪。如何强制 EB 在它启动的 EC2 实例上安装 ts-node-dev?
这是我的日志:
----------------------------------------
/var/log/web.stdout.log
----------------------------------------
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! A complete log of this run can be found in:
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! /home/webapp/.npm/_logs/2020-12-25T06_49_47_444Z-debug.log
Dec 25 06:49:47 ip-172-31-32-184 web: > testapp-01@1.0.0 dev /var/app/current
Dec 25 06:49:47 ip-172-31-32-184 web: > ts-node-dev --respawn --transpileOnly ./src/server.ts
Dec 25 06:49:47 ip-172-31-32-184 web: sh: ts-node-dev: command not found
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! code ELIFECYCLE
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! syscall spawn
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! file sh
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! errno ENOENT
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! testapp-01@1.0.0 dev: `ts-node-dev --respawn --transpileOnly ./src/server.ts`
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! spawn ENOENT
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR!
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! Failed at the testapp-01@1.0.0 dev script.
Dec 25 06:49:47 ip-172-31-32-184 web: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我确定我错过了一些东西,因为我对 EB 还很陌生。任何建议都会很棒,谢谢!
解决方案
推荐阅读
- node.js - split.EOL 在 Windows 中给出不同的结果
- python - 如何使用 Python 从网站下载交互式地图?
- json - Flutter 错误类“StudyList”没有实例方法“[]”
- python - EMFILE:打开的文件太多
- r - 在 lme4 包中获得两个回归斜率差异的输出
- java - 您如何与字符串进行大于或小于的比较
- android - Android 7 媒体播放器错误 (1,-2147483648)
- python - 如何在熊猫中已创建的数据框中插入列表项列表?
- python - 如何解决 TypeError:“numpy.float64”对象不能解释为整数
- python - Python在找到特定行时添加行