Comments (4)
All we do is run 'npm install', and apparently that includes those devDependencies. Am I missing something? Is there a flag that needs to be passed to avoid this?
Here is my simplified repro:
{
"author": "Igor Zevaka [email protected]",
"name": "runheat",
"description": "Runkeeper heat map",
"version": "0.0.0-8",
"devDependencies": {
"bogus": "1.0.26"
}
}
And that fails as follows:
D:\test\NpmDevDeps>npm install
npm http GET https://registry.npmjs.org/bogus/1.0.26
npm http 404 https://registry.npmjs.org/bogus/1.0.26
npm ERR! 404 'bogus' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd D:\test\NpmDevDeps
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code E404
npm ERR! message 404 Not Found: bogus
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\test\NpmDevDeps\npm-debug.log
npm not ok
from kudu.
The doco for NPM is a bit shite, but there is a production flag - "--production". If you rerun the above package.json, those dev dependencies wouldn't be installed.
Also, IMHO, when kudu is deploying, it should also do "npm rebuild". This will cause npm to rebuild all binary packages. This is necessary as people may be deploying with their whole node_modules folder that contain binaries were built for their system.
from kudu.
Ah, that's the piece I was missing! Would you like to try making the change? The code is in https://github.com/projectkudu/kudu/blob/master/Kudu.Core/Deployment/NpmExecutable.cs. You should be able to test this locally (see https://github.com/projectkudu/kudu/blob/master/README.markdown).
There is also a way to run your own private Kudu bits in Azure, though we haven't yet documented that.
from kudu.
Yeah sure, will do.
from kudu.
Related Issues (20)
- stopping_wait_time / 3 min not respected on scale-in HOT 1
- Calls for ListSecrets API will fail for .NET Isolated Functions in the call to FunctionsManager HOT 2
- Zip Deploy Not Deleting Old Zip Files HOT 1
- Kudu.Service running on k8sebuild-service for azure hci stack // aks hybrid // app-service // behind Proxy HOT 1
- 503 (Service Unavailable) when adding TMPDIR application setting to Azure PHP 8.2 App Service HOT 1
- Upgrading to .NET8 results in 503 service unavailable errors HOT 1
- kuduscript DEPLOYMENT_TEMP output ÞPLOYMENT_TEMP% HOT 1
- 2bytes character becomes "?" on console HOT 1
- web.config reset to default values HOT 2
- Updating Kudu Build to support .NET Isolated Azure Functions Projects. HOT 2
- IIS fails silently to load a custom managed module (distributed via a site extension) targeting NET framework webapp(s) HOT 2
- Avoiding hardcod versions of node + WEBSITE_NODE_DEFAULT_VERSION HOT 1
- QUESTION: Using %SCM_COMMIT_MESSAGE% in deploy.cmd - issues with linebreaks... HOT 1
- Upgrade KUDU to .NET Core HOT 1
- A WebJob uploaded to Linux App Service is not working HOT 3
- Post deployment script for zip deploy
- Access to the path '/home/site/locks/status.lock' is denied HOT 1
- Unable to deploy .NET Core WebJob on Linux App Service using the Azure Portal HOT 4
- New image not being downloaded upon restart HOT 1
- Windows App Service Zip Deploy HOT 1
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 kudu.