Azure Static Web App (SWA) with integrated API whose index.js has
require('dotenv').config({ path: './environment/misc.env'});
Local-run Azure Static Web Apps emulator
perfect. Merged into GitHub master
branch triggers Azure CI/CD deploy into Azure, test got
Stack: Error: Cannot find module 'dotenv'
dotenv
is in SWA's root package.json
"dependencies":
{
...
"dotenv": "^16.0.0"
}
GitHub project, Actions all jobs are good
SWA environment settings Front-end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.