Ok, so a couple days ago I began installing the
Beaker peer-to-peer browser k/t having seen a blurb about it on
Slashdot. This latest experience in the geekette has been... challenging but not in a super negatory way.
If I had this to do all over again, I would start with one of the first pages I read but did not comprehend initially. That page is the
Installing Node.js via package manager over at Node.js' home website. That's where I got this:
curl -sL https://deb.nodesource.com/setup_[choice-of-version].x | sudo -E bash -
sudo apt-get install nodejs
For me on Debian Linux, Buster edition, following the
curl/
apt-get install instructions worked. Until that point, I had been floundering around with things like
nvm because(y) that's what hit my radar early on. *it's a cognitive thing*
[choice-of-version] means there are several running around out there. I initially did the "setup_6.x" as reflected on Node.js' package manager tips page. I spent the rest of the day,
MANY hours, messing around with dependencies. That may or may not change, only Time will tell.
UPDATE 2017.08.18: I stumbled upon a
What's the difference between curl | sh and sh -c “$(curl)”? (StackExchange; ~2017.01.22). I'll be trying that one the next chance I get to see if it makes a difference in effectiveness, i.e. do things still install properly.
If you wander around on the issues bug report board for Beaker, you'll find a comment that
nodejs installs
npm by natural default. Not quite... i.e... if you install solely via
apt-get in my Debian Buster without the
curl, it appears to not quite go. I know this because(y) that's the route I stumbled upon first.
One factor that will be time consuming to test is that I didn't know about closing a terminal window and then reopening it just after install. Sometimes you have to do that before
npm becomes available. I didn't do that because I did not know it helps. It will take a fresh install, perhaps even of my old buddy Sid, to test that theory. That's at least 2 days all by itself aka... *it can wait*
So. #Life Lesson Learned on the fly: Skip straight to Node.js'
Installing Node.js via package manager. Should you encounter something where it doesn't work, hit up the appropriate Github issues page for whichever package is failing.
My next step was then to
npm install beaker. I messed up at first. I should have been writing up notes, but I didn't. There were two errors that aren't showing up now that it would have been nice to document.
Today... I'm seeing this:
UNMET PEER DEPENDENCY autoprefixer-core@^5.2.0
├── UNMET PEER DEPENDENCY babel-core@^5.0.0
├── UNMET PEER DEPENDENCY babel-loader@^5.3.2
├── UNMET PEER DEPENDENCY babel-plugin-object-assign@^1.2.1
├── UNMET PEER DEPENDENCY babel-plugin-rewire@^0.1.21
├─┬ beaker@6.1.0
│ ├─┬ change-case@2.3.1
│ │ ├── camel-case@1.2.2
│ │ ├── constant-case@1.1.2
│ │ ├── dot-case@1.1.2
│ │ ├── is-lower-case@1.1.3
│ │ ├── is-upper-case@1.1.2
│ │ ├── lower-case@1.1.4
│ │ ├── lower-case-first@1.0.2
│ │ ├── param-case@1.1.2
│ │ ├── pascal-case@1.1.2
│ │ ├── path-case@1.1.2
│ │ ├── sentence-case@1.1.3
│ │ ├── snake-case@1.1.2
│ │ ├── swap-case@1.1.2
│ │ ├── title-case@1.1.2
│ │ ├── upper-case@1.1.3
│ │ └── upper-case-first@1.1.2
│ ├── diff@2.2.3
│ ├── exit@0.1.2
│ ├── lodash@3.10.1
│ ├── minimist@1.2.0
│ ├─┬ nconf@0.7.2
│ │ ├── async@0.9.2
│ │ └─┬ yargs@3.15.0
│ │ ├── camelcase@1.2.1
│ │ ├─┬ cliui@2.1.0
│ │ │ └── wordwrap@0.0.2
│ │ └── window-size@0.1.4
│ ├─┬ q-io@1.13.4
│ │ ├─┬ collections@0.2.2
│ │ │ └── weak-map@1.0.0
│ │ ├── mimeparse@0.1.4
│ │ └── url2@0.0.0
│ ├─┬ sleep@3.0.1
│ │ └── nan@2.6.2
│ └── versiony@1.4.2
├── UNMET PEER DEPENDENCY coveralls@^2.11.2
< half a ton of UNMET PEER DEPENDENCY lines snipped >
└── UNMET PEER DEPENDENCY yaml-loader@^0.1.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules/7zip-bin/node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@^2.1.0 (node_modules/7zip-bin/node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.0: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN beaker@6.1.0 requires a peer of autoprefixer-core@^5.2.0 but none was installed.
< respective half ton of required PEER DEPENDENCY versions snipped (again) >
npm WARN beaker@6.1.0 requires a peer of yaml-loader@^0.1.0 but none was installed.
npm WARN beakerbrowser@ No repository field.
npm WARN beakerbrowser@ No license field.
Oy, have mercy. There
MUST be like one single package that covers all of those... or something like that. :)
But there's not. And something I noticed while proofreading here is that the "tree" there, Beaker in this case, appears in line where its respective package is actually halfway installed properly. *got it*
Here's a funny. The number of websites returned for a search on the above... is my old employee number at Kmart
MANY mango seasons ago..
*memories!*
One of those top website pages returned for my search... says it's a new thing that
we have to manually install those peer dependency packages. Are we sure about that, though? Let's check out another website. Ok, that one is saying to
try things like npm uninstall [package-name] and npm cache clean first. *that makes (total common) sense (when you know all the commands AND flags to use)*
Like
npm install --save-dev. That sounds like an important one to use... especially on dialup. *maybe (?)*
Now I'm looking at this:
npm WARN beakerbrowser@ No repository field.
npm WARN beakerbrowser@ No license field.
That sounds minorly important.... too. *hm*
Only 3 results?
That's bringing back memories of the good ol' days when you were lucky to get that many answers back. *lol*
Possible best answers are at
StackOverflow. Multiple comments hint that it's a developer thing to ignore those instead of making sure they don't occur. *grin*
This is already actually looking like it might could work. This right here:
beakerbrowser@ /home/candycane/Documents/git/beaker/beaker
└─┬ node-gyp@3.6.2
├─┬ fstream@1.0.11
│ └── graceful-fs@4.1.11
That's a sampling of the feedback that shows up on the terminal while doing this. That
graceful-fs right there was highlighted as not installed yesterday. The impression I'm getting is that it is now installed. That's because I am following this process as a mix garnered from the Yeoman@Github and Angular@Github links above:
npm uninstall beaker
npm cache clean
npm install node-gyp
npm install node-pre-gyp
npm install beaker
Don't know if it's appropriate to use it here, but there is that
--save-dev flag running around in the wild. That is
NOT --save-dep which would seem and feel more logical.
--save-dev means:
Dev Dependencies. A module installed using the "--save-dev" flag is saved into the "devDependencies" list in the package.json file. If an npm module is listed as a "devDependency" it means that your npm plugin isn't dependent on it, however your development environments are dependent on it.
k/t
Daniel Tonon @ LinkedIn
Those are things you need locally to do what you're doing... but maybe it's not a required demand at the project's end. *I think (?)*
There is another flag, "-g", e.g.
npm install -g that means globally across one's system. That takes root privileges to accomplish that one if you leave it like that. For me right now, I'm fine with it being "just" as me because I don't want it messing up my currently functioning globals... *grin*
Addendum as I proofread: Globally sounds desirable now to the point that I went that route. It's what things like
apt-get install already do by design.
Nope, there was still a massive laundry list of not-yet-installed packages (do they even call them packages?):
autoprefixer-core babel-core babel-loader babel-plugin-object-assign babel-plugin-rewire coveralls css-loader csso csswring eslint eslint-plugin-react file-loader grunt grunt-cli grunt-contrib-watch grunt-eslint grunt-filenames grunt-karma grunt-webpack imports-loader isparta-loader jade-loader jasmine jasmine-core json json-loader karma karma-chrome-launcher karma-cli karma-coverage karma-firefox-launcher karma-jasmine karma-jasmine-jquery karma-sourcemap-loader karma-spec-reporter karma-webpack less-loader lodash matchdep postcss-loader raw-loader react react-dom sass-loader style-loader webpack webpack-dev-server yaml-loader
48 packages if
mousepad (text editor) line counts are to be believed.
Packages. Do they even call them that in this instance? :)
Alrighty, then....
More errors...
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! shasum check failed for /tmp/npm-8755-700488db/registry.npmjs.org/eslint/-/eslint-4.4.1.tgz
npm ERR! Expected: 99cd7eafcffca2ff99a5c8f5f2a474d6364b4bd3
npm ERR! Actual: ba90d15ab3280166ff3d668f497996b23732fdec
npm ERR! From: https://registry.npmjs.org/eslint/-/eslint-4.4.1.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!
npm ERR! Please include the following file with any support request:
npm ERR! /home/candycane/Documents/git/beaker/beaker/npm-debug.log
But it's the one just above those that scares me.....
npm ERR! Linux 4.11.0-1-amd64
Um, yeahhhh.. That's what I'm using.
WHYYY is that a problem? *oh, no*
So you know from "oh,
cr4p!"? I just did again. I just successfully installed
istanbul-instrumenter-loader because
isapart-loader is "deprecated". *that's what they said*
It's not complaining about my Linux 4.11.0-1 kernel anymore... but it
somehow added a few more necessary packages because the count is now
UP to 54. That's after it installed a few things as other necessary dependencies. *hm*
Potentially getting smarter by the hour about all this. According to
another StackOverflow thread, the above peer dependency install list should look like
this:
autoprefixer-core@^5.2.0 babel-core@^5.0.0 babel-loader@^5.3.2 babel-plugin-object-assign@^1.2.1 babel-plugin-rewire@^0.1.21 coveralls@^2.11.2 css-loader@^0.15.6 csso@^1.3.11 csswring@^3.0.5 eslint@^1.1.0 eslint-plugin-react@^3.2.2 file-loader@^0.8.4 grunt@^0.4.5 grunt-cli@^0.1.13 grunt-contrib-watch@^0.6.1 grunt-eslint@^17.1.0 grunt-filenames@^0.4.0 grunt-karma@0.12.0 grunt-webpack@^1.0.11 imports-loader@^0.6.4 isparta-loader@^0.2.0 jade-loader@^0.7.1 karma@^0.13.8 karma-chrome-launcher@^0.2.0 karma-cli@^0.1.0 karma-coverage@^0.5.1 karma-firefox-launcher@^0.1.6 karma-jasmine@^0.3.6 karma-jasmine-jquery@^0.1.1 karma-sourcemap-loader@^0.3.5 karma-spec-reporter@^0.0.20 karma-webpack@~1.7.0 less-loader@^2.2.0 lodash@^3.10.0 matchdep@^0.3.0 postcss-loader@^0.4.3 react@0.14.2 react-dom@0.14.2 sass-loader@^2.0.1 style-loader@^0.12.3 webpack@^1.11.0 webpack-dev-server@^1.10.1 yaml-loader@^0.1.0
In other words,
leave the version numbers in there. Those matter to
npm. They're also noting the
--save flag so I'll be trying that, too.
For the more whacky looking ones, I saw a tip where you additionally even tack on some parentheses before you're done, e.g.:
npm install -g funkyPackageName@">=0.0.1"
Better yet, you can show that you're a really importantly too busy to type developer by further shortcutting that to:
npm i -g funky-package-name@">=0.0.1"
I tried it. *it works!*
MANY HOURS LATER: Am still at it. Had a few packages, namely
eslint and
webpack, that kept running me in circles with their peer dependency demands. I would update one then another would yell that its peer dependencies are unmet... even though I'd already manually installed them minutes before. I'm definitely missing some
minor detail here about the whole
npm process. :)
A couple packages have gone off and gotten themselves deprecated by becoming other names.
jade has something to do with
pug, and I'm not sure which
karma was triggering it but something wants to be
yarn or some other name I've already forgotten.
UPDATE 2017.08.18: I think that other name was
webpack. How'd I ever forget that?
Then I kept seeing this:
npm WARN deprecated bower@1.8.0: ..psst! While Bower is maintained, we recommend Yarn and Webpack for *new* front-end projects! Yarn's advantage is security and reliability, and Webpack's is support for both CommonJS and AMD projects. Currently there's no migration path, but please help to create it: https://github.com/bower/bower/issues/2467
If you see that message... and the related
npm install just seems to be... lost in space there, leave it have its head. It's downloading something large. It's not frozen or something...... *#Life lesson learned on the fly* :)
Ohhh-kayyy.
eslint and
webpack are running me all the freak all over the place... in circles. I install what I think is one of them, and a bunch of other unmet peer dependencies pop up. Those peer dependencies are in their same name, just different versions. I install one or more of
those... and the previous one... returns. *smacking head*
Then I remembered something I'd seen for a second:
$ npm ls webpack
beakerbrowser@ [file-path-location]
├── UNMET PEER DEPENDENCY eslint@4.4.1
├── UNMET PEER DEPENDENCY karma-jasmine-jquery@^0.1.1
└── UNMET PEER DEPENDENCY webpack@3.5.4
I installed the first one,
eslint@4.4.1 then ran
npm ls webpack again... nothin'. Freaking... nothin' changed.
I'm thinking... that I'm done running in circles for the day... is what I'm thinking...
*to be continued* :)