0

I am working on a React app with a MySQLdb and am trying to deploy with Heroku. I have followed a guide closely and am using JAWS DB hook to connect my db to Heroku. I am running into this error when I run the "heroku open" command after pushing to heroku:

"Error: Cannot find module '/app/node_modules/mime/mime.js'. Please verify that the package.json has a valid "main" entry"

My package.json has mime.js installed as a devDependency. I have set the "main" line in my package.json to "index.js" as well.

Repo: https://github.com/AndrewCodesDontYaKnow/ReactCalc

Anyone have any experience with this type of issue? Thanks much.

4

1 回答 1

1

我只是在不同的模块(在我的情况下为“telebot”)遇到了同样的问题我不知道如何解决这个问题(如果其他人发现这个问题,我也想知道如何解决它),但是我得到它的工作与解决...

我复制了模块源,并将其放入我的存储库中,并将其用作本地模块...

(在我的情况下,我的 .gitignore 文件忽略了任何“lib”文件夹,这让我很难过,直到我意识到 telebot 文件夹中的 lib 文件夹没有上传到 GitHub,因此没有进入 heroku,但是在将其注释掉并上传之后,本地模块也按预期工作),我认为这不是一个实际的答案,但我没有代表发表评论,所以我希望这会有所帮助

于 2020-11-10T04:26:06.080 回答