Git Product home page Git Product logo

Comments (6)

shannah avatar shannah commented on August 29, 2024

Can you post the full error readout? My gut says that it is probably a Node/NPM version error. If you upgrade node and npm to the latest, it should resolve the issue.

from jdeploy.

zachgrayio avatar zachgrayio commented on August 29, 2024
$ cat package.json                                                                 
{
  "bin": {
    "kalk": "jdeploy-bundle/jdeploy.js"
  },
  "author": "[email protected]",
  "description": "A CLI calculator written in Kotlin.",
  "main": "index.js",
  "preferGlobal": true,
  "repository": "https://github.com/zachgrayio/kalk.git",
  "version": "1.0.0",
  "jdeploy": {
    "jar": "kalk-1.0.0/lib/kalk-1.0.0.jar"
  },
  "dependencies": {
    "shelljs": "^0.7.5"
  },
  "license": "ISC",
  "name": "kalk",
  "files": [
    "jdeploy-bundle",
    {
      "dir": "kalk-1.0.0",
      "includes": "lib/*.jar"
    }
  ],
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}
$ npm -v                                                                           
5.3.0
$ node -v                                                                          
v8.4.0
$ jdeploy install                                                                  
Executing copy rule CopyRule{dir=kalk-1.0.0/lib, includes=[kalk-1.0.0.jar], excludes=null}
kalk-1.0.0/lib/.DS_Store does not match any patterns.
kalk-1.0.0/lib/annotations-13.0.jar does not match any patterns.
kalk-1.0.0/lib/cmdloop-0.1.4.jar does not match any patterns.
kalk-1.0.0/lib/kotlin-stdlib-1.1.4.jar does not match any patterns.
up to date in 0.109s
/usr/local/bin/kalk -> /usr/local/lib/node_modules/kalk/jdeploy-bundle/jdeploy.js
/usr/local/lib/node_modules/kalk -> /Users/triggerhippy/code/repos/kalk-dist
$ kalk 2 + 2                                                                      
4.0
$ jdeploy publish                                                                
Executing copy rule CopyRule{dir=kalk-1.0.0/lib, includes=[kalk-1.0.0.jar], excludes=null}
kalk-1.0.0/lib/.DS_Store does not match any patterns.
kalk-1.0.0/lib/annotations-13.0.jar does not match any patterns.
kalk-1.0.0/lib/cmdloop-0.1.4.jar does not match any patterns.
kalk-1.0.0/lib/kotlin-stdlib-1.1.4.jar does not match any patterns.
up to date in 0.105s
/usr/local/bin/kalk -> /usr/local/lib/node_modules/kalk/jdeploy-bundle/jdeploy.js
/usr/local/lib/node_modules/kalk -> /Users/triggerhippy/code/repos/kalk-dist
npm ERR! f.replace is not a function

from jdeploy.

shannah avatar shannah commented on August 29, 2024

Hmm.. When I download NodeJS/NPM from the nodejs website (via Mac installer), I get these versions:

Steves-iMac:~ shannah$ node -v
v6.11.3
Steves-iMac:~ shannah$ npm -v
3.10.10

With those versions it works fine.

I tried upgrading npm via sudo npm install -g npm but that broke everything so NPM no longer worked at all. -- had to reinstall from installer.

WIll try upgrading node via npm first and then upgrading npm.

One thing worth noting is that running jdeploy install && npm publish should be equivalent to running jdeploy publish.

That might work for you. It is also possible that the shelljs dependency needs to be updated to a newer version to work with these newer versions of node/npm. The latest is 0.7.8. Will need to investigate further.

from jdeploy.

zachgrayio avatar zachgrayio commented on August 29, 2024

Thanks for looking into.

Tried with v0.7.8 of shelljs, same result.

Ran the following with 0.7.8:

$ jdeploy install && npm publish                                           
Executing copy rule CopyRule{dir=kalk-1.1.0/lib, includes=[kalk-1.1.0.jar], excludes=null}
kalk-1.1.0/lib/annotations-13.0.jar does not match any patterns.
kalk-1.1.0/lib/cmdloop-0.1.4.jar does not match any patterns.
kalk-1.1.0/lib/kotlin-stdlib-1.1.4.jar does not match any patterns.
up to date in 0.111s
/usr/local/bin/kalk -> /usr/local/lib/node_modules/kalk/jdeploy-bundle/jdeploy.js
/usr/local/lib/node_modules/kalk -> /Users/triggerhippy/code/repos/kalk-dist
npm ERR! f.replace is not a function

from jdeploy.

zachgrayio avatar zachgrayio commented on August 29, 2024

Seems I may be having issues with NPM moreso than your library. Will keep looking.

from jdeploy.

zachgrayio avatar zachgrayio commented on August 29, 2024

package.json was the culprit:

"files": [
    "jdeploy-bundle",
    {
      "dir": "kalk-1.0.0",
      "includes": "lib/*.jar"
    }
  ]

should have just been

"files": [
    "jdeploy-bundle",
    "kalk-1.0.0"
  ]

I think I found that config in example in the jdeploy docs somewhere, might be worth double checking and updating if needed. Closing out. Great lib btw.

from jdeploy.

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.