Heroku Deploy Error: Cannot find module './errors/cast'

前端 未结 1 708
天命终不由人
天命终不由人 2021-01-16 02:31

I built my app using yeoman angular-fullstack generator and then modified for my own purposes. I built the dist folder to deploy to heroku using yo angular-fullstack:deploy

1条回答
  •  粉色の甜心
    2021-01-16 03:18

    The issue is almost certainly that you haven't checked in all the files you need. If you can't see the problem in your git repository, try running heroku run bash and using cd, ls, and more to look around what's getting deployed to Heroku and see what is missing.

    Your problem is likely that you have require('./errors/cast') but have not checked in a cast file.

    Update:

    The other likelihood is that you checked in ./errors/Cast on OS X which is case insensitive, but the file can't be found on Linux which is case sensitive.

    0 讨论(0)
提交回复
热议问题