insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

All plugin installation fail

Open mikaoelitiana opened this issue 2 years ago • 3 comments

Expected Behavior

User should be able to install plugins even if they already have a NPM_TOKEN set

Actual Behavior

I cannot install any plugin, an error message is displayed, stating Failed to replace env in config: ${NPM_TOKEN}

Screen Shot 2022-08-19 at 11 13 30

Reproduction Steps

  1. Set NPM_TOKEN environment variable in your system (using fish shell in my case set -gx NPM_TOKEN npm_XXXXXXXXXXXXXXXXX)
  2. Open Insomnia and go to settings
  3. Go to Plugins tab
  4. Type insomnia-plugin-faker in plugin name and press Install plugin

Is there an existing issue for this?

Additional Information

Error: Error invoking remote method 'installPlugin': Error: Yarn error {"type":"error","data":"Could not write file \"/yarn-error.log\": \"EROFS: read-only file system, open '/yarn-error.log'\""}
{"type":"error","data":"An unexpected error occurred: \"Failed to replace env in config: ${NPM_TOKEN}\"."}

    at o.invoke (node:electron/js2c/renderer_init:57:526)
    at async BP._handleAddFromNpm (file:///Applications/Insomnia.app/Contents/Resources/app.asar/index.c4312761.js:1849:44230)

Insomnia Version

v2022.5.0

What operating system are you using?

macOS

Operating System Version

macOS 12.5.1 (21G83)

Installation method

homebrew

Last Known Working Insomnia version

No response

mikaoelitiana avatar Aug 19 '22 09:08 mikaoelitiana

Hi @mikaoelitiana thanks for reporting this!

We were not able to reproduce this error on latest stable (2022.5.1) and latest beta (2022.6.0-beta.2).

Are you by any chance able to reproduce with any of these other versions?

filfreire avatar Aug 19 '22 13:08 filfreire

@filfreire I will try with one of these

mikaoelitiana avatar Aug 22 '22 07:08 mikaoelitiana

@filfreire I still have the error on latest stable. Maybe there is something wrong with my setup. I will double-check that

mikaoelitiana avatar Aug 22 '22 07:08 mikaoelitiana

I'm experiencing the same issue on 2022.6.0 (M1 Mac).

matthewdickinson avatar Oct 05 '22 20:10 matthewdickinson

I'm encountering the same error on Linux (Ubuntu 20.04 LTS) with version 2022.6.0.

aka-mj avatar Nov 07 '22 13:11 aka-mj

This issue still happen to me when trying to install plugin. For precision, I use asdf as Node runtime management (similar to nvm), maybe the issue is related to that?

mikaoelitiana avatar Mar 03 '23 09:03 mikaoelitiana

As a workaround, I open the terminal in ~/Library/Application Support/Insomnia/plugins and manually install the plugin with npm i -S ...

mikaoelitiana avatar Mar 03 '23 09:03 mikaoelitiana

Same here, updated to latest version. I tried a bunch of different plugins and none worked. I tried with name installation directly, via link too and with npm i -S. The stacktrace that appears is empty.

npm i -S stuck (using nodejs 20, and npm 9)

Currently, I'm using Macbook M1 with Ventura 13.4.1 (c).

calebemachado avatar Aug 18 '23 00:08 calebemachado

What's the point of having a really nice Plugin Hub if this kind of issue stays open for more than a year? Seriously every time I want to install a plugin I have to Google insomnia failed to install plugin to find again the solution on this page.

And I don't even have any information in the Stack Trace section. It's simply empty image

jmevel avatar Sep 22 '23 12:09 jmevel

Workaround:

  1. Go to C:\Users\YOUR_USER\AppData\Roaming\Insomnia\plugins
  2. Run npm init --yes
  3. Run npm i PACKAGE_NAME

If you don't know where are plugins located:

  1. Go to Preferences
  2. "Plugins" tab
  3. Button "Reveal Plugins Folder"

Icaruk avatar Sep 28 '23 22:09 Icaruk