Closed tbrowder closed 3 years ago
I am a complete node/npm novice, but I have too much invested in my harp website to not at least try to fix it.
Have you abandoned harp
?
Additional debugging with npm audit indicates a problem also with terraform.
Seems that it does not work with node v12 https://github.com/sintaxi/harp/issues/648. Try with node v10. I am not sure if they are willing to continue it.
Do you have a good suggestion for an alternative static gen system? What do you think of Jekyll?
@tbrowder I have not consider other options yet, but maybe this site might help https://www.staticgen.com
Thanks, that site is the genesis of my question about Jekyll. Looks kile a good alternative, but only if Harp is abandoned.
Harp isn’t abandoned. Looking into fixes.
On Wed, Oct 9, 2019 at 2:24 PM Tom Browder notifications@github.com wrote:
Thanks, that site is the genesis of my question about Jekyll. Looks kile a good alternative, but only if Harp is abandoned.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sintaxi/harp/issues/654?email_source=notifications&email_token=AAAAGY7JV667SYISMFKWO5LQNZDZPA5CNFSM4I54DNG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAZOM4I#issuecomment-540206705, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGYZOH3KQY5GUAI5EHHTQNZDZPANCNFSM4I54DNGQ .
Thanks, Brock!
@tbrowder just released harp v0.31.0
please test install and let me know if this issue is resolved.
Stiil have a problem:
Downloaded and unpacked harp-0.31.0.tar.gz
:
$ sudo npm install -g harp-0.31.0
/usr/bin/harp -> /usr/lib/node_modules/harp/bin/harp
+ harp@0.31.0
updated 1 package in 2.073s
root@juvat3:/home/tbrowde/Downloads# ls
Date-Calc-6.4.tar.gz assets.tar.gz invoice.pdf pandoc-2.7.3-1-amd64.deb
Expirion-20190727-amd54.iso google-chrome-stable_current_amd64.deb map-113-canterbury-circle-niceville.pdf tp-link-TL-SG108E-v3
Expirion-20190727-desktop.png harp-0.31.0 node-v12.11.1-linux-x64.tar.xz
algo-master.zip harp-0.31.0.tar.gz package-lock.json
root@juvat3:/home/tbrowde/Downloads# npm install -g harp-0.31.0
/usr/bin/harp -> /usr/lib/node_modules/harp/bin/harp
+ harp@0.31.0
updated 1 package in 2.041s
Get the version:
$ harp -V
fs.js:130
throw err;
^
Error: ENOENT: no such file or directory, scandir '/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:865:3)
at Object.getInstalledBinaries (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/extensions.js:131:13)
at foundBinariesList (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/home/tbrowde/Downloads/harp-0.31.0/node_modules/node-sass/vendor'
}
Hmm, I can't seem to replicate this problem. I'm using the same version of node and npm. Installation works fine for me.
On Thu, Oct 10, 2019 at 18:35 Brock Whitten notifications@github.com wrote:
Hmm, I can't seem to replicate this problem. I'm using the same version of node and npm. Installation works fine for me.
Brock, I'll look closer into my setup when I get home tomorrow. I may have messed up my system doing audits and other npm things I know little about.
-Tom
It works fine for me. Thanks @sintaxi
I see the problem references terraform, so I tried to install it from the latest tarball: no luck. All the installs keep failing around nod-sass with weird errors about unable to create dirs, etc. I am running as root and don't understand that. And on it goes.
Is there any place a node noob can go for help? The #node and #node-jc IRC channels seem inactive.
Questions for those who have had success:
Here's what I just tried:
node
and reinstalled node 10+
harp
and the terraform
repos$ sudo npm install -g terraform
+ terraform@1.9.0
added 1 package from 25 contributors in 0.741s
$ sudo npm install -g harp
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated classifier@0.1.0: Package no longer supported. Contact support@npmjs.com for more info.
/usr/bin/harp -> /usr/lib/node_modules/harp/bin/harp
npm WARN lifecycle node-sass@4.12.0~install: cannot run in wd node-sass@4.12.0 node scripts/install.js (wd=/usr/local/git-repos/forks/harp/node_modules/node-sass)
npm WARN lifecycle core-js@2.6.9~postinstall: cannot run in wd core-js@2.6.9 node scripts/postinstall || echo "ignore" (wd=/usr/local/git-repos/forks/harp/node_modules/core-js)
npm WARN lifecycle node-sass@4.12.0~postinstall: cannot run in wd node-sass@4.12.0 node scripts/build.js (wd=/usr/local/git-repos/forks/harp/node_modules/node-sass)
+ harp@0.31.0
added 623 packages from 590 contributors in 22.179s
Checking the installation:
$ ls /usr/lib/node_modules
harp npm terraform
$ harp
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, scandir '/usr/local/git-repos/forks/harp/node_modules/node-sass/vendor'
at Object.readdirSync (fs.js:790:3)
at Object.getInstalledBinaries (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/extensions.js:131:13)
at foundBinariesList (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/binding.js:15:30)
at Object.<anonymous> (/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
Success with a hack: looking at the top line of the error shown above, I tried creating the missing directory manually. Then I retried executing harp again and got:
$ cd usr/local/git-repos/forks/harp/node_modules/node-sass
$ sudo mkdir vendor
$ harp
/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding /usr/local/git-repos/forks/harp/node_modules/node-sass/vendor/linux-x64-64/binding.node
Then I created the missing directory and ran harp again:
$ cd vendor
$ sudo mkdir linux-x64-64
$ harp
/usr/local/git-repos/forks/harp/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding /usr/local/git-repos/forks/harp/node_modules/node-sass/vendor/linux-x64-64/binding.node
I used command locate
to find any binding.node files and found one which I copied to that harp repo directory and then, as if by magic, harp worked!
It seems that, for whatever reason, the sass installation doesn't know how to bind to the libsass-dev
library on a linux 64-bit system. I was just lucky enough to have one in another repo.
I have no idea how to fix the situation or what is really causing the problem. I hope Brock can find the root cause and file the issue in the right place.
I'm confused by a few things; just reading through it now.
npm install -g harp
@tbrowder perhaps you can expand?
Because running "npm install -g harp" doesn't find this harp, it finds another.
I'm looking forward to an update from harp authors, many of whom have experienced installation failures.
Harp is currently a mess when trying to install via npm. Pity looks really promising
@drewwebster @note4 Can you tell me what version of node are you using? Can you tell me what OS you are on? Are you able to provide a stacktrace of the error you see on installation?
Hello everyone. I had the same problem today while trying to install harp through npm. Luckily, I could work around the issue by using yarn instead of the default installation method. Here's what I did:
npm install -g yarn
yarn global add harp
And that's all it took, really. I hope this helps others in the same situation. Maybe it's a good idea to update the website and include the alternate installation method.
@sintaxi By the way, thank you so much for such an awesome piece of software!
Harp has had a lot of work lately and all security issues have been addressed. Harp now installs without any warnings...
On another note, harp got an updated CLI, and now does zero-configuration bundling for .cjs
and .jsx
files. The latest version of harp (0.41.0
) is only 18MB! - down from 85M (0.29.0
).
Harp is better than ever. Closing this issue.
OS: Debian 10 (Buster)