o4oren/Ad-Hoc-Email-Server

{ "error": "Error | Cannot find module 'html'" }

Closed this issue · 7 comments

I followed the readme, using manual install not docker.

I assume this is some sort of deprecation or whaterver. Shoul that module be already present at install step?

Try the steps in the blog post - you can find it at https://ahem.email

Try the steps in the blog post - you can find it at https://ahem.email

I tried. Server does work. That error comes out when i enter the ulr path manually instead of using form.

Do you have the dist folder? It should have been created after the build:ssr step.
The error indicates the server cannot find an serve the static content of the front end.
You can also try running:
npm run start
Instead of the node ahem.js. And access it at port 4200.

Yes i have dist folder. i also rebuilt when i touch options.
I tried npm run start and saw for first time an unmeet dependancy for concurrent so i've installed it.
Ran npm run start. Everything works like before, but when you enter a mailbox and hit refresh it does fail.
Even if i saw the dev server at 4200 message, nothing is working at that port.

I followed everything, i did twice. I got always the same result.

Did you try docker as well?

i tried to changed the file in: (/root/ahem-server/server/app/ serverapp.js)

i comment out the : app.set('view engine', 'html');

and then i changed

res.render('index', { req }); into -> res.sendfile(path.join('dist','browser','index.html'), { req });

and it worked for me

res.render('index', { req }); into -> res.sendfile(path.join('dist','browser','index.html'), { req });

@quoctru99
Can i ask how you ended up with this solution?
It does work for me too :-) thank you so much.

@o4oren
I didn't touch anything and no, i didn't try docker image because i don't plan to run it with docker.