dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.62k stars 251 forks source link

npm ERR! could not determine executable to run #2653

Open OldManUmby opened 2 years ago

OldManUmby commented 2 years ago

Please select the area your bug applies to. (Multiple selections are possible. You can leave it blank if you're not sure.)

Describe the bug

Followed instructions - "Publish > Quick Start" - all went well until... "Clone the Next.js repository and install dependencies | npx dendron publish init"

To Reproduce

See above

Expected behavior

npm ERR! could not determine executable to run

Screenshots

See copy of log below

Desktop (please complete the following information)

Additional context

0 verbose cli [ 0 verbose cli '/usr/local/bin/node', 0 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js', 0 verbose cli 'exec', 0 verbose cli '--', 0 verbose cli 'dendron', 0 verbose cli 'publish', 0 verbose cli 'init' 0 verbose cli ] 1 info using npm@8.5.0 2 info using node@v16.14.2 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 1ms 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms 6 timing config:load:builtin Completed in 1ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:/Users/umbyology/Documents/Projects/Dendron/OneRPG/.npmrc Completed in 0ms 10 timing config:load:project Completed in 6ms 11 timing config:load:file:/Users/umbyology/.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:credentials Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 11ms 19 timing npm:load:configload Completed in 11ms 20 timing npm:load:setTitle Completed in 13ms 21 timing config:load:flatten Completed in 2ms 22 timing npm:load:display Completed in 3ms 23 verbose logfile /Users/umbyology/.npm/_logs/2022-03-30T00_59_47_457Z-debug-0.log 24 timing npm:load:logFile Completed in 4ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 0ms 27 timing npm:load Completed in 31ms 28 http fetch GET 200 https://registry.npmjs.org/dendron 623ms (cache revalidated) 29 timing command:exec Completed in 633ms 30 verbose stack Error: could not determine executable to run 30 verbose stack at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23) 30 verbose stack at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:115:15) 30 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli.js:66:5) 31 verbose pkgid dendron@0.18.0 32 verbose cwd /Users/umbyology/Documents/Projects/Dendron/OneRPG 33 verbose Darwin 21.4.0 34 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "dendron" "publish" "init" 35 verbose node v16.14.2 36 verbose npm v8.5.0 37 error could not determine executable to run 38 verbose exit 1 39 timing npm Completed in 902ms 40 verbose code 1 41 error A complete log of this run can be found in: 41 error /Users/umbyology/.npm/_logs/2022-03-30T00_59_47_457Z-debug-0.log

Dendron Log file

Newb here, where do I get the Log?

hikchoi commented 2 years ago

Hey @OldManUmby. Thanks for reporting the issue.

Did you happen to run npx dendron publish export?

From the logs it seems like npx is grabbing the package dendron which is unfortunately not affiliated with us. dendron is an alias to dendron-cli, which will only work with npx if you locally have dendron-cli installed.

Could you try the last step instead with npx dendron-cli ... and see if that resolves your issue?

OldManUmby commented 2 years ago

I'll have some time this weekend, I'll take another look and get back to you. THX for the reply!

Umby

On Mar 31, 2022, at 10:34 AM, Mark Hyunik Choi @.***> wrote:

Hey @OldManUmby https://github.com/OldManUmby. Thanks for reporting the issue.

Did you happen to run npx dendron publish export?

From the logs it seems like npx is grabbing the package dendron https://www.npmjs.com/package/dendron which is unfortunately not affiliated with us. dendron is an alias to dendron-cli, which will only work with npx if you locally have dendron-cli installed.

Could you try the last step instead with npx dendron-cli ... and see if that resolves your issue?

— Reply to this email directly, view it on GitHub https://github.com/dendronhq/dendron/issues/2653#issuecomment-1084754301, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMAYK2GDVVPZTZQFNX7FS3VCXAXLANCNFSM5SAKCZ6A. You are receiving this because you were mentioned.

PabloLION commented 2 years ago

I got this error with npx dendron-cli publish init too, when dendron-CLI was not installed.

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/dendron-cli - Not found
npm ERR! 404 
npm ERR! 404  'dendron-cli@latest' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
PabloLION commented 2 years ago

a small thing to mention: the command of installation npm install @dendronhq/dendron-cli@latest was not mentioned in the Dendron CLI page nore in the Publish Page. Maybe consider adding them?

OldManUmby commented 2 years ago

Hey @OldManUmby. Thanks for reporting the issue.

Did you happen to run npx dendron publish export?

From the logs it seems like npx is grabbing the package dendron which is unfortunately not affiliated with us. dendron is an alias to dendron-cli, which will only work with npx if you locally have dendron-cli installed.

Could you try the last step instead with npx dendron-cli ... and see if that resolves your issue?

I followed these directions from your wiki at: https://wiki.dendron.so/notes/e5st4LFLtIwwbQmC6JBaF/#quickstart

Quickstart Summary This guide walks you through publishing with Next.js.

NOTE: We use yarn to manage all our js commands. npm works as well if you'd rather use it instead. All code examples will use yarn

npm install -g yarn

Steps Setup: Run the following commands at the root of your Dendron Workspace

From Common:

  1. Update .gitignore echo .next >> .gitignore

  2. Clone the Next.js repository and install dependencies npx dendron publish init

STEP TWO IS WHERE I GET THE ERR

PabloLION commented 2 years ago

@OldManUmby can you try npm install @dendronhq/dendron-cli@latest or equivalently yarn add @dendronhq/dendron-cli@latest first and then use npx dendron publish init? I had the same error but after installing the CLI everything works correctly.

OldManUmby commented 2 years ago

Here's what happened when I ran npm install @dendronhq/dendron-cli@latest ...

npm install @dendronhq/dendron-cli@latest
npm WARN deprecated @types/node-fetch@3.0.3: This is a stub types definition. node-fetch provides its own type definitions, so you do not need this installed.
npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated @types/airtable@0.10.1: This is a stub types definition. airtable provides its own type definitions, so you do not need this installed.
npm WARN deprecated mdast@3.0.0: `mdast` was renamed to `remark`
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 616 packages, and audited 617 packages in 47s

148 packages are looking for funding
  run `npm fund` for details

11 high severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Then I ran npx dendron publish init and got this ...

npx dendron publish init

===================
Telemetry notice 🌱
===================
Dendron collects limited usage data to help improve the quality of our software.

You can learn everything about our telemetry policies by visiting the following link: 
https://wiki.dendron.so/notes/84df871b-9442-42fd-b4c3-0024e35b5f3c.html

If you would like to opt out, follow the instructions below: 
https://wiki.dendron.so/notes/84df871b-9442-42fd-b4c3-0024e35b5f3c.html#how-to-opt-out-of-data-collection
no workspace detected. --wsRoot must be set

Any Suggestions?

PabloLION commented 2 years ago

seems your error is only no workspace detected. --wsRoot must be set

In which folder did you run this npx dendron publish init?

OldManUmby commented 2 years ago

OH RATS FART! ... my bad.

However, I still got the same ERR this time ...

npx dendron publish init
npm ERR! could not determine executable to run

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/umbyology/.npm/_logs/2022-04-04T22_21_56_655Z-debug-0.log
PabloLION commented 2 years ago

@OldManUmby It's still npm install @dendronhq/dendron-cli@latest because you installed the node package in the wrong directory. You need to install it in the current folder (or globally). And after that the npx dendron publish init can run.
You can uninstall the older one.

OldManUmby commented 2 years ago

Ah got it! ... THX. Close issue.

PabloLION commented 2 years ago

I'm glad that we solved our problems.

But for me the docs can be improved because the "Prerequisites: Install the latest version of the Dendron CLI" was not very clear. Maybe I should create a new issue or PR.

a small thing to mention: the command of installation npm install @dendronhq/dendron-cli@latest was not mentioned in the Dendron CLI page nore in the Publish Page. Maybe consider adding them?

texylvanian commented 1 year ago

Hi. I'm getting similar issues, but problems occur when I run npm install @dendronhq/dendron-cli@latest per this thread.

2023-01-19T21_00_10_114Z-debug-0.log

PabloLION commented 1 year ago

@texylvanian it seems your problem is 3813 error node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.4/napi-v6-win32-unknown-x64.tar.gz failed, reason: unable to get local issuer certificate

Looks like a different issue to me, maybe create a new one? (and close this one please @OldManUmby )