0
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
0

1 Answer 1

3

require-in-the-midlle is a hook to be installed by npm:

sudo apt install npm
npm install require-in-the-middle --save

Source: https://npm.io/package/require-in-the-middle

6
  • 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'
    – NiveditaK
    Mar 9, 2022 at 13:36
  • 1
    Great. 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 (with apt). 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?
    – NiveditaK
    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 that npm installs it as a hook instead.
    – Terrance
    Mar 9, 2022 at 13:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .