Package Details: insomnia 11.2.0-2

Git Clone URL: https://aur.archlinux.org/insomnia.git (read-only, click to copy)
Package Base: insomnia
Description: Cross-platform HTTP and GraphQL Client
Upstream URL: https://github.com/Kong/insomnia
Licenses: MIT
Submitter: kpcyrd
Maintainer: plp
Last Packager: plp
Votes: 25
Popularity: 1.27
First Submitted: 2020-10-19 17:29 (UTC)
Last Updated: 2025-06-09 12:46 (UTC)

Latest Comments

1 2 3 4 5 6 .. 10 Next › Last »

plp commented on 2025-06-11 22:07 (UTC)

Wow. Look here:

https://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm

If the given module is not a core module, Node.js will then begin to search for a directory named, "node_modules". It will start in the current directory (relative to the currently-executing Javascript file in Node) and then work its way up the folder hierarchy, checking each level for a node_modules folder.

And of course yay builds its packages in a subfolder of your home directory.

gvaleika commented on 2025-06-11 21:05 (UTC)

cache clear didn't help. But while looking to delete .npm directory I noticed jhipster leftovers package.json, package-lock.json and node_modules in my home directory. I don't remember what problem I was trying to solve, but somehow these situated in my home direcotory. After I deleted them standard yay -Syu correctly built and updated insomnia. Thanks for your support!

plp commented on 2025-06-11 20:20 (UTC)

Well, it works fine here. I've built it a million times...

Perhaps you could try cleaning your npm cache by doing npm cache clear --force. Then try building the package again.

HOWEVER, before doing that, save the output of your npm cache ls. We may need to send it upstream if this ends up being their issue.

gvaleika commented on 2025-06-11 11:41 (UTC)

Yes, it still fails same way.

plp commented on 2025-06-11 07:53 (UTC)

You mean npm install fails with the same error messages?

What happens if you delete .nvm and node_modules, forcing it to reinstall everything?

$ rm -fr .nvm node_modules
$ nvm install
$ npm install

Does it still fail?

gvaleika commented on 2025-06-10 22:06 (UTC)

gv@gv-pc:~/.cache/yay/insomnia/src/insomnia-core-11.2.0 (master=)$ export NVM_DIR="/home/gv/.cache/yay/insomnia/src/insomnia-core-11.2.0/.nvm"
gv@gv-pc:~/.cache/yay/insomnia/src/insomnia-core-11.2.0 (master=)$ source /usr/share/nvm/init-nvm.sh
gv@gv-pc:~/.cache/yay/insomnia/src/insomnia-core-11.2.0 (master=)$ nvm install
Found '/home/gv/.cache/yay/insomnia/src/insomnia-core-11.2.0/.nvmrc' with version <22.14.0>
v22.14.0 is already installed.
Now using node v22.14.0 (npm v10.9.2)
gv@gv-pc:~/.cache/yay/insomnia/src/insomnia-core-11.2.0 (master=)$ npm install

and on npm install all errors long list.

plp commented on 2025-06-10 15:22 (UTC) (edited on 2025-06-10 15:23 (UTC) by plp)

Actually, what's happening is that the package itself uses nvm to install the versions of npm and nodejs that it needs.

In _ensure_local_nvm() it instructs nvm to use install nodejs version 22.14.0:

export NVM_DIR="${srcdir}/${pkgname}-core-${pkgver}/.nvm"
source /usr/share/nvm/init-nvm.sh

And then it proceeds with prepare() and build().

Version 22.14.0 is installed because this is what insomnia needs. It's specified in the source's .nvmrc file.

I still think your problem has to do with nvm grabbing a cached package from somewhere. Of course, I may be wrong, but in any case we need to find out what's happening.

Do you think you could "replay" what the PKGBUILD does? I.e. go into src/insomnia-core-11.2.0 and run:

$ export NVM_DIR="your-path-to-src/insomnia-core-11.2.0/.nvm"
$ source /usr/share/nvm/init-nvm.sh
$ nvm install
$ npm install
$ export NODE_OPTIONS="--max-old-space-size=8192"
$ npm run package --workspace=packages/insomnia -- --linux dir

And see if it fails and where.

gvaleika commented on 2025-06-10 08:42 (UTC)

I removed ~/.nvm, ~/.npm, /root/.npm - this doesn't change anything. fragment from log:

0 verbose cli /home/gv/.cache/yay/insomnia/src/insomnia-core-11.2.0/.nvm/versions/node/v22.14.0/bin/node /home/gv/.cache/yay/insomnia/src/insomnia-core-11.2.0/.nvm/versions/node/v22.14.0/bin/npm
1 info using npm@10.9.2
2 info using node@v22.14.0

it takes them from yay insomnia cache. Globally npm installed is 11.4.1-1, but it uses internal binary.

plp commented on 2025-06-10 07:58 (UTC)

Maybe it's cached somewhere? What happens if you delete/rename your ~/.nvm and ~/.npm directories?

Also, what packages do you have installed for Node? nodejs is at 24.1.0-2, nvm at 0.40.3-1, and npm at 11.4.1-1.

gvaleika commented on 2025-06-10 06:57 (UTC)

It seems there is no lodash on my machine:

gv@gv-pc:~$ npm list | grep lodash
gv@gv-pc:~$ npm -g list | grep lodash
gv@gv-pc:~$