-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old npm version (1.1.37) on Windows Function App with Node.js runtime (v14.16.0) #479
Comments
I tried in Azure Function App Linux and everything works: ➜ az functionapp create \
--name david-test-safe-to-delete-... \
--resource-group ... \
--subscription ... \
--storage-account ... \
--consumption-plan-location eastus \
--disable-app-insights true \
--os-type Linux \
--runtime node \
--runtime-version 14 \
--functions-version 3 ➜ func azure functionapp publish \
david-test-safe-to-delete-... \
--publish-local-settings \
--overwrite-settings \
--build remote
Logs from remote build during deployment of function:
|
//...
try {
await executeCommand("node --version");
await executeCommand("where node");
await executeCommand("npm --version");
await executeCommand("where npm");
await executeCommand("npm run ...");
} //...
//...
When npm error occurs, message is:
So it clearly shows that something is wrong with node and npm versions on Windows Azure Function App for Typescript |
Hi @davidljuba15031979, Thank you for your feedback! We will check for the possibilities internally and update you with the findings. |
Transferred this issue to nodejs repo for further investigation. |
Running into this as well :/ Using Typescript Azure Functions and tried using Node.js 12/14/16 as well as Azure functions 2,3/4, all with the same result where Also using windows functions. |
As a workaround, you can hardcode the path to the npm version you want. However, we make NO guarantees that this version/path will continue to exist. Practically speaking, though, its relatively stable and I can't remember a time where we've removed npm versions. Here's an example using the above sample code:
I think this is a "feature request" as opposed to a "bug" for two reasons:
All that being said, 1.1.37 is super old and I hope we can address this soon. This is the first issue I'm aware of asking about running Lastly, I confirmed this behavior is the same for Azure web apps, meaning it'll have to be done at the App Service-level, not just for Functions (which adds some overhead involving other teams). |
Same problem here, running an Azure Function app on Azure on Windows and the PowerShell stack. I configured Node to version 18, using the app setting. The npm version keeps sticking to 1.x. When will this be fixed? Even if it's not a regression, it seems to me that it's not desirable behavior. |
In Azure Function App running in Windows OS with Node.js runtime in Azure Cloud, when Node.js version is v14.16.0, npm is very very old version 1.1.37.
It should be like this (Kudu App service https://<app-name>.scm.azurewebsites.net/api/diagnostics/runtime):
It is clearly shown by this code that npm version is wrong in runtime of Azure Function:
➜ az functionapp create \ --name david-test-safe-to-delete-... \ --resource-group ... \ --subscription ... \ --storage-account ... \ --consumption-plan-location eastus \ --disable-app-insights true \ --os-type Windows \ --runtime node \ --runtime-version 14 \ --functions-version 3
I can not execute some npm scripts because npm is not working as expected...
The text was updated successfully, but these errors were encountered: