azure-samples / js-e2e-express-server Goto Github PK
View Code? Open in Web Editor NEWReplacement used in documentation for express generator.
License: MIT License
Replacement used in documentation for express generator.
License: MIT License
Hello
I used this nodejs, i run these commands to deploy app to public webapp(webapp Node - 18-lts standard)
Publishing model: Code
npm install
az account set --subscription "xx"
az webapp up --sku P1V3 --name app-xx --os-type Linux
this nodejs works well locally, however, when I reach the webapp endpoint, here is the error
:( Application Error
If you are the application administrator, you can access the diagnostics
HTTP server errors : 503 Server Unavailable
Container issue : app timed out
Applications logs
Web App Troubleshooter : App Container Failed to Start
Web App Restarted
Docker image or framework version change was found
Your application was recycled due to either framework version or docker image name has changed
Do you know why it does not work on webapp azure?
Thanks
Please provide us with the following information:
x
)- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
git clone https://github.com/Azure-Samples/js-e2e-express-server
cd js-e2e-express-server
npm install
Here comes the bug:npm install microsoft-cognitiveservices-speech-sdk
npm ERR! code 1
npm ERR! path /Users/stefan/projects/Talk2Me/node_modules/microsoft-cognitiveservices-speech-sdk
npm ERR! command failed
npm ERR! command sh -c npm install --package-lock-only --ignore-scripts --no-audit && npx npm-force-resolutions
npm ERR! up to date in 4s
npm ERR! Error: Cannot find module '/Users/stefan/.config/.npm/_npx/73b02210abc194ff/node_modules/.bin/out/goog/bootstrap/nodejs.js'
npm ERR! Require stack:
npm ERR! - /Users/stefan/.config/.npm/_npx/73b02210abc194ff/node_modules/.bin/npm-force-resolutions
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:833:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1057:19)
npm ERR! at require (node:internal/modules/cjs/helpers:103:18)
npm ERR! at Object. (/Users/stefan/.config/.npm/_npx/73b02210abc194ff/node_modules/.bin/npm-force-resolutions:19:1)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1155:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1033:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:868:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm install should be succesful since i found this in a tutorial about
Cognitive Services Speech
OS: macOS 13.0 22A380 x86_64
Host: MacBookPro16,1
แ
node --version
v16.18.0
แ
npm --version
9.1.2
found a workaround:
first add these to "scripts" section
preinstall
setup
then add the microsoft-cognitiveservices-speech-sdk
package directly among depencies
# package.json
"scripts": {
"preinstall": "npm install -g [email protected]",
....
"setup": "npm install --package-lock-only --ignore-scripts --no-audit"
},
"dependencies": {
....
"microsoft-cognitiveservices-speech-sdk": "^1.24.0"
},
}
then run:
rm -rf node_modules && npm cache verify && npm install
this will most likely fail
however if you then run
yarn install
the installation will be succesful
then the app works locally assuming the Create Cognitive Services Speech resource have been created :)
because the section:
Deploy local Express.js app to remote App service in Visual Studio Code
fails during deployment
Have a nice day
Thanks! We'll be in touch soon.
I've been pinged as this repo doesn't meet the "durable ownership minimums" for Microsoft compliance.
Please add another owner to this repo to meet those requirements!
I'll check this in 2 weeks, if the requirements are not met, I'll add myself as an owner, and archive the repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.