I'm trying to deploy a really simple Next.js app on Azure app service. After running 'npm run build' I use azure Visual Studio Code extensions to finalise the deployment.
The process is successful, and if I connect to my app service via FTP I can see the files in the wwwroot directory.
But if I try to browse the app I get 'Application Error If you are the application administrator, you can access the diagnostic resources.'
Accessing the diagnostic this is the message I see:
48:17.620204936Z Generating app startup command
2019-03-24T08:48:17.635158983Z Found scripts.start in /home/site/wwwroot/package.json
2019-03-24T08:48:17.649648532Z Running npm --prefix=/home/site/wwwroot start
2019-03-24T08:48:18.702111743Z
2019-03-24T08:48:18.702164243Z > [email protected] start /home/site/wwwroot
2019-03-24T08:48:18.702170943Z > next start
2019-03-24T08:48:18.702174443Z
2019-03-24T08:48:18.791276730Z /home/site/wwwroot/node_modules/.bin/next: line 1: ../next/dist/bin/next: not found
The message is clear but I m not sure what I m doing wrong. This is the first time I m trying to deploy a node.js based application on Azure. Any help would be really appreciated!
/home/site/wwwroot/node_modules/next/dist/bin/next