Comments (7)
From the README
(which is also available via node-deb --show-readme
):
Requirements
- dpkg
- fakeroot
- jq
These are all available through
apt
andbrew
.
And yes, loading JSON in JS is trivially easy (or I assume it is), but I actually don't know any JS/Node and I wrote this as an admin who just wanted our deploys to be a little less messy. If I had to write this in JS, it probably wouldn't have ever existed. Such is life in the imperfect world of FOSS.
It is admittedly odd to use jq
over writing it in JS, but this is the first time someone has had enough of a problem to say something in ~2 years.
If you think this is a deficiency of node-deb
, please open a separate ticket so people can discuss the change to JS. As it is, whenever I make changes, I usually end up breaking other people's CI or workflow, and I try to be sensitive to that. Changing to adding a hard requirement on node
warrants public discourse before deciding which way to go.
Because there is no way to guess why it does not work
And to be fair, there's not really any way to reliably predict that someone has the wrong binary executing from their path. In theory, you could install your own version of curl
or node
or anything else, and then we're in an extremely complex space where every script has to error check every shell command to ensure that the binary executing actually is the binary it thinks.
I have updated the README
with commit 7d914f9 to include a link to the correct jq
should someone else have a similar issue.
from node-deb.
Actually, the dependencies are just missing..
from node-deb.
Hey @milipili jq
is actually a binary you can get from apt
or brew
.
$ node-deb
Error: Cannot find module 'commander'
$ sudo npm install -g commander
$ node-deb
Error: Cannot find module 'async'
$ sudo npm install -g async
$ node-deb
Error: Cannot find module 'rimraf'
Error: Cannot find module 'winston'
Error: Cannot find module 'colors'
I'm not sure where that error came from since node-deb
is just an oversized bash script. It shouldn't be calling node
ever or running and JS files. I'm not what's going on there. Can you do a vim $(which node-deb)
and add the flag set -x
to the top of the script. Then run it again and copy/paste the output to a Gist. Maybe that can help me debug.
from node-deb.
Hum I've installed jq
via npm. After I've installed the deps it started but I was unable to make it work anyway (some exceptions somewhere).
I forgot to give my os: debian 9 stretch. nodejs installed via ppa (don't know if it changes anything).
Finally I've made the package manually. It. But I can retry on a fresh debian
from node-deb.
It looks like the npm
package jq
is just jQuery whereas the binary I'm talking about is this:
https://stedolan.github.io/jq/
I understand that it's a bit odd to use something other than node
to process the JSON, but when I made this I was doing sys-admin work and just needed some bash to handle packing my company's apps for deployment. I could conceivably rewrite it in JS, but that's a whole 'nother issue.
heartsucker@pythagoras:~ (master)$ jq --version
jq-1.5-1-a5b5cbe
If you don't see that output, then you might have to uninstall whatever jq
you installed with npm
as it may have higher PATH
precedence than your apt
/brew
packages.
from node-deb.
It is probably fine to install another package (even if loading json in js is a piece of cake so I don't really understand...). But the documentation should be updated. Because there is no way to guess why it does not work (well, or won't bother, like me today since I didn't have time for that)
from node-deb.
Well, first, if there is some documentation, people can figure out why it does not work as expected. So this ticket can be closed I guess.
That said, from a js point of view, I think indeed jq
should be replaced by pure js.
from node-deb.
Related Issues (20)
- No more node_modules/.bin directory in the debian package HOT 7
- Migrate from Bash to JavaScript
- Error parsing file HOT 6
- Using dh-sysuser when available HOT 1
- Unable to run app HOT 9
- node-deb not ignoring own temp directory... HOT 1
- Does node_deb.entrypoints.cli support more than 1 file? HOT 1
- Deprecated dependencies HOT 1
- Use node-deb in bitbucket pipelines HOT 1
- dpkg-deb: error: unable to create 'real-app_0.1.0_all.deb': Success
- Add option to specify conflicts
- Add Conflicts in debian control template
- add option to not create system users or groups HOT 3
- Typo prevents removing links from .bin HOT 1
- add tests for Bionic Beaver when it's released
- npm install in postinst fails when having native library dependency HOT 3
- Question: usage of pm2
- bash: node-deb: command not found HOT 5
- unescaped newline inside substitute pattern HOT 1
- postinst prevent user creation HOT 2
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 node-deb.