User@userAcc-Dummy:/$ sudo apt-get install npm require-in-the-middle
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package require-in-the-middle
1 Answer
require-in-the-midlle
is a hook to be installed by npm
:
sudo apt install npm
npm install require-in-the-middle --save
-
I have already installed the npm version (6.14.4+ds-1ubuntu2). However, when I am trying to install a pluging {node scripts/generate_plugin --name test -y} ; I am getting an error mentioned below internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'require-in-the-middle' Mar 9, 2022 at 13:36
-
1Great. you can skip that step then. The point here is to understand the hook isn't installed from the Ubuntu repositories and not a .deb. It has to be installed by
npm
and, of course,npm
has to be installed first (withapt
). Is there soemthing else you don't understand? If this answer is useful please accept it. Mar 9, 2022 at 13:41 -
I understand the theoretical part you mentioned above; but still I don't get my answer :) How I can install npm or "require-in-the-middle" from Ubuntu repositories? Mar 9, 2022 at 13:48
-
Really? So, recapitulating: 1st you install
npm
(if already installed move on to the hook installation) the 2nd you install the hook with the second command. What exactly are you still not understanding? Mar 9, 2022 at 13:50 -
@NiveditaK ChanganAuto clearly states in the answer that you DO NOT install
require-in-the-middle
from the repositories, but thatnpm
installs it as a hook instead.– TerranceMar 9, 2022 at 13:57