Closed andrewoodleyjr closed 4 years ago
Hi there !
Very likely that PR #31 will fix it when it's merged. That PR initiated when we had an issue when deploying on Cloud Foundry ... which uses buildpacks, same as Heroku. Very likely that when you deploy, the node_modules found in the directory where your code execute is a symlink; which breaks default behavior: module-alias can't find your package.json
.
However, good news: in the meantime, you can fix it by initializing the module to tell it where your package.json
is located. Just replace require('module-alias/register');
with require('module-alias')({ base: process.cwd() });
.
Sorry for the slow response. Cheers !
Should be fixed in 2.2.0 thanks to #31.
This is not working from the Heroku CLI and should be reopened
Hey @ekatzenstein , thanks for reporting ! I'll reopen this.
Would you mind providing a bit more context ?
Cheers !
Closing due to inactivity.
This is still failing with typescript... on heroku.
I am using module-alias within my nodejs application. Locally everything works fine, the file path and modules are being found.
However, when deploying on Heroku none of my aliases are being recognized and this error occurs
bin/www
package.json