Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3326

Cannot install mongodb-client-encryption@1.2.4

    • Not Needed

       

      Hey everyone,

       

      I tried installing the newest version of mongodb-client-encryption@1.2.4, but the installation fails with following error message:

      > mongodb-client-encryption@1.2.4 install C:\workspace\b...\node_modules\mongodb-client-encryption
      > prebuild-install --tag-prefix node-v || node-gyp rebuild
      prebuild-install WARN install No prebuilt binaries found (target=14.15.4 runtime=node arch=x64 libc= platform=win32)
      C:\workspace\...\node_modules\mongodb-client-encryption>if not defined npm_config_node_gyp (node "C:\Program Files\node-v14.15.4-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\node-v14.15.4-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
      gyp: binding.gyp not found (cwd: C:\workspace\...\node_modules\mongodb-client-encryption) while trying to load binding.gyp
      gyp ERR! configure error 
      gyp ERR! stack Error: `gyp` failed with exit code: 1
      gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\node-v14.15.4-win-x64\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
      gyp ERR! stack at ChildProcess.emit (events.js:315:20)
      gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
      gyp ERR! System Windows_NT 10.0.19041
      gyp ERR! command "C:\\Program Files\\node-v14.15.4-win-x64\\node.exe" "C:\\Program Files\\node-v14.15.4-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
      " "rebuild"
      gyp ERR! cwd C:\workspace\blauspecht-twitter-client\blauspecht-frontend\node_modules\mongodb-client-encryption
      gyp ERR! node -v v14.15.4
      gyp ERR! node-gyp -v v5.1.0
      gyp ERR! not ok
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! mongodb-client-encryption@1.2.4 install: `prebuild-install --tag-prefix node-v || node-gyp rebuild`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the mongodb-client-encryption@1.2.4 install script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      npm ERR! A complete log of this run can be found in:
      npm ERR! C:\Users\spfaf\AppData\Roaming\npm-cache\_logs\2021-06-02T03_54_00_305Z-debug.log
      

       

       

      v1.2.3 installs just fine.

       

      npm i
      > mongodb-client-encryption@1.2.3 install C:\workspace\...\node_modules\mongodb-client-encryption
      > prebuild-install --tag-prefix node-v || node-gyp rebuild
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\tailwindcss\node_modules\chokidar\node_modules\fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
      added 4 packages from 11 contributors and audited 772 packages in 13.007s
      81 packages are looking for funding
       run `npm fund` for details
      found 0 vulnerabilities
      

       

      As there weren't a lot of commits between both versions, I suspect could https://github.com/mongodb/libmongocrypt/commit/7d773f2c101d2bab037d3b2b946067b3625f1387 be the reason.

       

      Possible explanation:

      • As prebuild-install cannot find any prebuilt binaries, node-gyp.js rebuild is executed, which needs the file binding.gyp. Binding.gyp and files that it depends on are not published with npm.
        "files": [    
      "index.js",    
      "README.md",    
      "CHANGELOG.md",    
      "lib",    
      "src",    
      "build",    
      "index.d.ts"  ],
      

       

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            s.pfaffel@gmail.com Stefan Pfaffel
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: