Giter Club home page Giter Club logo

Comments (4)

davidebbo avatar davidebbo commented on September 13, 2024

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.

izevaka avatar izevaka commented on September 13, 2024

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.

davidebbo avatar davidebbo commented on September 13, 2024

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.

izevaka avatar izevaka commented on September 13, 2024

Yeah sure, will do.

from kudu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.