Coder Social home page Coder Social logo

Comments (5)

sandipchitale avatar sandipchitale commented on September 23, 2024

I worked around it by downloading the right version in

flatDirRepository/
  x64/
    node.exe

and then defining:

repositories {
    flatDir {
        dirs 'flatDirRepository'
    }
    ...
}

But documentation proper way to solve it will be helpful.

Also not sure why distBaseUrl is not really used to get node distribution, but instead a dependency resolution is used. It may be that I am not understanding the code properly.

from gradle-node-plugin.

srs avatar srs commented on September 23, 2024

Right now it will try every repository in the repositories list until it finds the right one. It's not a very good way to do it, but it has worked so long (except in your case it seems). The right repository is an ivy-repository with some custom patterns that will try to match using gradle dependency.

I am in the process of trying to change this but have not decided on how yet.

from gradle-node-plugin.

sandipchitale avatar sandipchitale commented on September 23, 2024

Can you please explain what you mean by " The right repository is an ivy-repository with some custom patterns". Are you referring to the addRepository code in SetupTask?

from gradle-node-plugin.

srs avatar srs commented on September 23, 2024

The plugin (gradle-node-plugin) adds a ivy repository to the node distribution root. It's using an ivy repo just becouse it's the only one that can handle this type of requests. It would be better to create a specialized repository for getting the node exec but right now we just use an ivy repo.

This repo is added as the last one so every other repos you are adding in repositories clause will be resolved before this one. If (for some reason) it finds a file on the path it will get that file and DO NOT move to the next one.

In the latest SNAPSHOT of gradle-node-plugin I have done it a littlebit different so you will probably not have the same problem that you encounter now.

from gradle-node-plugin.

sandipchitale avatar sandipchitale commented on September 23, 2024

Aha...that explains it. Actually in the end it turned out that our Artifactory cache had a corrupt node-*.exe file (only 73 bytes) for 64 bit variant which apparently originally came from the

http://snapshots.repository.codehaus.org/org/nodejs/x64/node/0.10.38/x64

I had not even expected this.

After cleaning that up it ended up getting to the ivy repo that you add and it worked.

I appreciate your responses.

from gradle-node-plugin.

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.