Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install plugin #6

Open
zorox0x opened this issue Sep 6, 2022 · 15 comments
Open

Failed to install plugin #6

zorox0x opened this issue Sep 6, 2022 · 15 comments

Comments

@zorox0x
Copy link

zorox0x commented Sep 6, 2022

Hello I'm getting this error when am trying to install the plugin

Error invoking remote method 'installPlugin': Error: Yarn error warning package.json: No license field

@techchrism
Copy link
Owner

I've been aware of this for a while but unfortunately, I haven't had the time to look into replicating it.
As a workaround, you can open the plugins directory (accessible from the menu) and manually run npm install insomnia-plugin-valorant

@darknblack
Copy link

As an alternative to npm install insomnia-plugin-valorant, You can run "git clone insomnia-plugin-valorant" the plugins directory to solve the issue.

@techchrism
Copy link
Owner

Interesting, I wouldn't expect that to work. Insomnia must automatically be installing plugin dependencies or something along those lines.

@techchrism
Copy link
Owner

techchrism commented Jan 11, 2023

Good news - I'm able to replicate this issue using yarn.
Bad news - I haven't been able to replicate this within Insomnia.

First, I found the yarn version by running & "$env:LocalAppData\insomnia\app-2022.7.1\Insomnia.exe" "$env:LocalAppData\insomnia\app-2022.7.1\resources\bin\yarn-standalone.js" -v (in powershell) with the ELECTRON_RUN_AS_NODE environment variable set to true.

Then I installed yarn with npm install -g [email protected]
Finally, I got the license warning from running yarn add insomnia-plugin-valorant --no-lockfile --production twice

@RiceGrain1
Copy link

Any update to this issue? I'm experiencing the same problem.

@techchrism
Copy link
Owner

I haven't yet found anything that might cause this.
Just to test, can you check if installing other insomnia plugins works as expected?

@RiceGrain1
Copy link

Nope. I still get the same error trying to install other plugins as well. If I try and manually install it with the code from github I get a different error:

Error: Cannot find module 'node-fetch'
Require stack:
- C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\info-providers\RiotAuthProvider.js
- C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\remoteAPI.js
- C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\plugin.js
- C:\Users\holdi\AppData\Local\insomnia\app-2023.1.0\resources\app.asar\index.html
    at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
    at o._resolveFilename (node:electron/js2c/renderer_init:2:3833)
    at Module._load (node:internal/modules/cjs/loader:811:27)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at o._load (node:electron/js2c/renderer_init:2:3109)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\info-providers\RiotAuthProvider.js:1:174)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\info-providers\RiotAuthProvider.js:328:3)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at o._load (node:electron/js2c/renderer_init:2:3109)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\remoteAPI.js:1:181)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\src\remoteAPI.js:51:3)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at o._load (node:electron/js2c/renderer_init:2:3109)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\plugin.js:1:174)
    at Object.<anonymous> (C:\Users\holdi\AppData\Roaming\Insomnia\plugins\insomnia-plugin-valorant-trunk\plugin.js:23:3)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13328)
    at o._load (node:electron/js2c/renderer_init:2:3109)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at iU (file:///C:/Users/holdi/AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:67:75164)
    at eI (file:///C:/Users/holdi/AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:67:75814)
    at async f (file:///C:/Users/holdi/AppData/Local/insomnia/app-2023.1.0/resources/app.asar/index.6916a4f6.js:187:13786)

@techchrism
Copy link
Owner

Yeah, if you do a simple git clone, you'd still need to install the dependencies with npm install, which is the cause of the most recent error.
Since this happens with other plugins (phew) if you could open an issue at https://github.com/Kong/insomnia/issues and link it here, I'd appreciate it. I did a quick search and at a glance, there doesn't appear to be an existing open issue.

@RiceGrain1
Copy link

Yeah, if you do a simple git clone, you'd still need to install the dependencies with npm install, which is the cause of the most recent error.
Since this happens with other plugins (phew) if you could open an issue at https://github.com/Kong/insomnia/issues and link it here, I'd appreciate it. I did a quick search and at a glance, there doesn't appear to be an existing open issue.

Can I just open a ticket there and add a link that links here?

@techchrism
Copy link
Owner

Yeah, that would work too. I'd open it myself but I haven't been successful in replicating it within Insomnia.

@RiceGrain1
Copy link

So when you try and install the plugin it works for you? Is there a chance we're on different insomnia versions?

@techchrism
Copy link
Owner

Yes, installing the plugin works fine for me, across multiple versions including the latest.

@RiceGrain1
Copy link

Yes, installing the plugin works fine for me, across multiple versions including the latest.

Okay well now its halfway working and I literally did not change a thing. I am so confused. When I try and make a request most of them just give me an "Error: Timeout was reached" response. Not sure why it wont go through.

Would you like me to still make the issue on the insomnia repo?

@techchrism
Copy link
Owner

Yes, if you're still able to replicate the issue (perhaps through uninstalling and reinstalling insomnia), I'd appreciate it if you could open an issue on the insomnia repo.

@techchrism
Copy link
Owner

Replication is trivial - just create a package.json in a parent directory (such as the user home directory) with the contents {}.

Fixed by my PR here Kong/insomnia#6829

I'll close this issue when the fix is merged and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants