When I run the command tsx watch src/bootstrap/server.ts I get this error:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
the error points to this line of code:
const jwtKey = fs.readFileSync(process.env.JWT_PUBLIC_KEY as string)
This has never thrown any errors before and everything I find online praises how easy tsx is so I must be doing something wrong.
Currently this repo uses nodemon and runs with no problem, its just slow to recompile.
本文标签:
版权声明:本文标题:I am trying to set up a typescript repo to use tsx for development but when ever I run tsx I get type errors - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.roclinux.cn/p/1744076687a2529479.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论