asamuzaK / withExEditorHost

Native messaging host for withExEditor
MIT License
33 stars 8 forks source link

Problem upgrading: Cannot find package 'https-proxy-agent' #110

Closed chriscroome closed 2 years ago

chriscroome commented 2 years ago

When trying to upgrade I get:

npm run setup -- --browser=firefox

> withexeditorhost@7.0.3 setup /example/path/withExEditorHost
> node ./index.js setup "--browser=firefox"

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'https-proxy-agent' imported from /example/path/withExEditorHost/modules/main.js
    at new NodeError (internal/errors.js:322:7)
    at packageResolve (internal/modules/esm/resolve.js:732:9)
    at moduleResolve (internal/modules/esm/resolve.js:773:18)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
    at link (internal/modules/esm/module_job.js:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! withexeditorhost@7.0.3 setup: `node ./index.js setup "--browser=firefox"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the withexeditorhost@7.0.3 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /example/path/.npm/_logs/2022-02-16T13_42_05_575Z-debug.log

This is with these versions:

npm --version
6.14.16
node --version
v14.19.0

On Debian Bullseye.

asamuzaK commented 2 years ago

Cannot be reproduced Please uninstall withexeditorhost and then reinstall it

asamuzaK commented 2 years ago

Maybe it's safer to do an overwrite install with npm i -g instead of npm up -g. I have changed the documentation.

asamuzaK commented 2 years ago

Maybe related? [BUG] npm update -g package@latest removes all global packages · Issue #3175 · npm/cli

chriscroome commented 2 years ago

I haven't been using npm i -g or npm up -g, I have Node.JS installed using a .deb.

asamuzaK commented 2 years ago

If you can't use npm, consider using binaries.

asamuzaK commented 2 years ago

btw, how did you install withExEditorHost the first time?

chriscroome commented 2 years ago

It was years ago but I believe I simply cloned the repo, I have been updating it using a Bash script containing:

#!/bin/bash

cd ~/withExEditorHost
git stash
git pull
npm run setup -- --browser=firefox
asamuzaK commented 2 years ago

Running host from source is not recommended anymore.

chriscroome commented 2 years ago

Thanks, I'll give that a go :+1: