So how would I fix it if this was the issue?
# dev
j
So how would I fix it if this was the issue?
c
I think you could try editing this line to remove the word "npx" https://github.com/dendronhq/dendron/blob/master/package.json#L81
j
well, got past that... then another issue cropped up
Copy code
$ node bootstrap/scripts/buildAll.js
building all...
$ npx lerna run build --scope @dendronhq/common-all
00h00m00s 0/0: : /home/jeep/dev/dendron/node_modules/execa/index.js:212
                throw error;
                ^

Error: Command failed with exit code 1: npx lerna run build --scope @dendronhq/common-all
lerna notice cli v3.22.1
c
Unfortunately I'm not sure what could be going on, this just tells us that this script is failing on the first line before any actual work is done ( https://github.com/dendronhq/dendron/blob/c0db0dc0b6520684e072372cb1cf7695a2e8271e/bootstrap/scripts/buildAll.js#L15 ) What happens if you run these? Based on what we saw before, it seemed like there could be some version mismatches between different JS build tools in your $PATH.
Copy code
which node
which npx
which yarn
which lerna
Given what we tried before, I suppose we could try removing npx from every line in the buildAll script. If we have lerna installed locally already maybe the npx prefix might not be necessary. (Disclaimer: I am not on the dendron development team just a fellow community member, so someone may have a better response for you when the workweek resumes next week)
j
They are all installed locally
Copy code
/usr/bin/node
/usr/bin/npx
/usr/local/bin/yarn
/usr/local/bin/lerna
same error if I remove all npx:
Copy code
/home/jeep/dev/dendron/packages/unified/package.json
$ node bootstrap/scripts/buildAll.js
building all...
$ lerna run build --scope @dendronhq/common-all
00h00m00s 0/0: : /home/jeep/dev/dendron/node_modules/execa/index.js:212
                throw error;
                ^

Error: Command failed with exit code 1: lerna run build --scope @dendronhq/common-all
lerna notice cli v3.22.1
c
Hm, so one thing that concerns me slightly is is that system node and local node seem to be different. Mac has some builtin version of node which might not be the same as what you installed via homebrew, and sometimes these mismatches lead to conflicts, In other words, node yarn npx lerna may not be pointing to the same version of node. There's a bit more detail about how this can happen here: https://stackoverflow.com/a/64513873/5129731 I work as a JS dev in my day job, and we use Volta https://volta.sh/ to make sure all the JS things in a given project are pointing to the same place (since you might use node 14 in one project, 16 on another, etc). In my case all the aliases show up under the same directory (username/.volta/toolname), which could maybe help in your case if you want to try it.
j
I removed yarn, did
npm install -g yarn -force
and I appear to be past the errors. Currently building plugin-views... thanks for the help!
c
Hooray! Glad to hear it 🙂
4 Views