Comments (17)
Resurrecting this issue. For those developing straight into the Portal editor a npm install
button is really all that's needed right now. If you develop locally you most probably do it with source control, so Kudu takes care of npm install
as deployment step. The Portal is what's making the whole npm install
thing jarring, and it doesn't have to be. I believe a simple "actions" dropdown will make a huge difference:
- npm init -y
- npm install
- npm install --save {MODULE_NAME_FROM_USER_INPUT}
Not sure how we can get a progress indicator for those actions since a npm install
in Kudu isn't very verbose.
I agree the installation of dependencies should be uniform across supported languages, but for the time being, Node is really the one suffering the most from the Portal authoring experience.
update:
or we could simply bring the Kudu console over and open it in an overlay or soft tab.
from azure-functions-host.
+++ for adding a first class npm install
for enhanced CD experience. npm is getting faster, so it should not be as big of an issue anymore. Running npm install
manually is a bit of a pain...
Another suggestion: allow for using either yarn
instead of npm
(depending on the presence of yarn.lock
.
from azure-functions-host.
An "npm install" button might be nice somewhere in here...
from azure-functions-host.
For the time being I think the best option is to keep a package.json
file in the root folder and install every package from there. Those packages are available for every function.
For my use case this works.
from azure-functions-host.
+1 for this. I am standing up some Azure functions and doing this all through the Azure portal rather than through cli tools, so having this in the portal would be fantastic.
Any updates on progress? I.e. is this just in discussion phase? planned for development (i.e. in roadmap)? in development? in testing? I'm guessing it's the discussion phase based on the "needs-discussion" label, but just thought I'd ask in case the ticket is not totally up-to-date 😉
from azure-functions-host.
On a slightly related note: it would be great if after a "git push" (which deploys the new function version on the host) a "npm install" would automatically triggered. It seems currently after each deployment you have to visit the Console and install the node modules for each function over and over again.
from azure-functions-host.
At the very least it would make sense to run NPM install on function restart. I understand not doing it on every commit.
from azure-functions-host.
Key question is whether this should be a runtime or design time thing. Typically, in Kudu, it's always deployment time. but here for C# it sounds like it's runtime. Worth discussing.
from azure-functions-host.
Yeah, whatever we do should be consistent across the languages.
from azure-functions-host.
Tricky thing about npm is that it's super slow to run even when there is no work to do. So we probably can't run install before running the function just in case the packages changed. Or maybe we'd need a smart marker that tells us when packages.json changed since the last npm run.
from azure-functions-host.
A workaround for the moment is to execute npm install from a kudu console. However, it will likely fail if the package contains binaries as the version in the path in kudu will likely be different from the version running the function.
from azure-functions-host.
We should discuss this. It's an interesting question. C# has the project.json per function. Node can do per function or per function app. We know that package management UI is expensive and probably out of scope. I'm inclined to say this is post RC, but I'd like to think about exposing the kudu terminal in an easier way to help mitigate (/cc @mattchenderson)
from azure-functions-host.
If you have a package.json at the root of your Function App, it will do so today. If we support a per function package.json later on, we'll have to see what we do. We might rely on the host to manage that, if we do.
from azure-functions-host.
At least for my current environment (using Function App version Latest (~0.4)) it does not work, but I had to manually trigger npm install
after every git push again manually, as described in https://azure.microsoft.com/en-us/documentation/articles/functions-reference-node/ under Node Version & Package Management. This makes my DX not as pleasant as it probably could be.
from azure-functions-host.
Yeah, I was wondering if there was a way of remotely triggering npm install
for each function
It doesn't make much sense to have to manually log into the kudu console to run it. For node, this should be something that you can either start remotely or that runs automagically if it finds a valid package.json file after deploying.
from azure-functions-host.
The thing that's most important to me is that it happens quickly enough to be useful. Right now, even though we have the option to do it from the kudu console, the speed makes it a non-option.
from azure-functions-host.
This is not something we're currently tracking or planning to execute on. Closing to reflect that.
from azure-functions-host.
Related Issues (20)
- Use EV2 tasks for deploying tooling feed
- GrpcWorkerChannel.LoadResponse is not threadsafe
- EventHugTrigger fails with AzureAppConfigurationProvider
- Migrate EndToEnd integration tests to Azure.Data.Tables
- Node.js Azure function input binding for Table storage ignores rowKey
- How to investigate messages being stuck and then being moved to poison queue? HOT 7
- Consolidate scale metrics table client with shared services
- Is .NET 8 In-Process model available in Azure for US Government?
- Functioning HOT 2
- Queue triggers take up to ten minutes to be serviced
- Difference between various release tracks (~4.1000, ~4.800, ~4.30) HOT 2
- Microsoft.Azure.Functions.Worker.ApplicationInsights 1.3.0 references unknown version of Microsoft.Azure.Functions.Worker.Core 1.19.0 HOT 1
- Add logging to identity Worker Specific Extensions Versions perhaps as part of the WorkerInitRequest
- Simplify sanitizing approach
- Evalute if WEBSITE_DEFAULT_HOSTNAME should be used for setting hostname HOT 1
- Remove the hardcoded string used to create hostname for Linux dedicated HOT 1
- Is it possible to run streaming API fluently through API management? HOT 1
- .NET 8 In process support in Sovereign Clouds HOT 2
- Error message "Error configuring services in an external startup class. ---> System.IO.FileNotFoundException : Could not load file or assembly 'System.ComponentModel, Version=8.0.0.0" when migrating to .NET 8 with in-process model HOT 2
- Question: Create input trigger at runtime? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-functions-host.