NPM Install fails in docker container when adding mdbootstra


Topic: NPM Install fails in docker container when adding mdbootstrap-pro via git oauth

malte pro premium asked 4 years ago

Expected behavior

NPM Install clones git repository of ng-uikit-pro-standard Actual behavior npm install results in the following error only when ng-uikit-pro-standard is added to package.json:

npm verb stack Error: Command failed: git submodule update -q --init --recursive
npm verb stack
npm verb stack     at ChildProcess.exithandler (child_process.js:308:12)
npm verb stack     at ChildProcess.emit (events.js:315:20)
npm verb stack     at maybeClose (internal/child_process.js:1048:16)
npm verb stack     at Socket.<anonymous> (internal/child_process.js:439:11)
npm verb stack     at Socket.emit (events.js:315:20)
npm verb stack     at Pipe.<anonymous> (net.js:673:12)
npm verb cwd C:\my-app
npm verb Windows_NT 10.0.19041
npm verb argv "C:\\nodejs\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "--loglevel" "verbose"
npm verb node v14.15.1
npm verb npm  v6.14.8
npm ERR! code 57
npm ERR! Command failed: git submodule update -q --init --recursive
npm ERR!
npm verb exit [ 1, true ]
npm timing npm Completed in 85445ms

Resources (screenshots, code snippets etc.)

Node Version: v14.15.1

Git Version: v2.29.2.windows.2

Docker Container: Windows Container FROM mcr.microsoft.com/dotnet/core/sdk:3.1

package.json:

{
    "name": "my-app",
    "version": "0.0.0",
    "license": "MIT",
    "scripts": {
      //...
    },
    "private": true,
    "module": "commonjs",
    "dependencies": {
      // ...
      "ng-uikit-pro-standard": "git+https://oauth2:<token>@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git",
      // ...
    },
    "devDependencies": {
     //...
    }
  }

In Docker File:

RUN SETX Path "C:\\nodejs;c:\git\cmd;c:\git\bin;c:\git\usr\bin;c:\gcc\bin;c:\7z;%Path%"
RUN npm i --loglevel verbose

Arkadiusz Idzikowski staff commented 4 years ago

Can you try a 'normal' npm installation of the ng-uikit-pro-standard? Just to make sure that there are no problems with access to the MDB GitLab server.


malte pro premium commented 4 years ago

Outside the docker container (Win10, Same Node Version) it works fine. Inside the Docker Container it only works with yarn. This is not nice since i dont want to install many things in the docker image but it works. Only NPM I wants to execute "git submodule".


Arkadiusz Idzikowski staff commented 4 years ago

We would need some more information about your configuration: dockerfile, docker-compose.yml, package.json scripts


malte pro premium commented 4 years ago

Hi there!

I created a sample project https://github.com/nfMalde/MDTest This reproduces the error if using the command descriped in readme.md

Best,

Malte


Arkadiusz Idzikowski staff commented 4 years ago

Thank you. We will take a closer look at that and let you know what we found.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 10.0.0
  • Device: PC
  • Browser: Docker
  • OS: Windows Container
  • Provided sample code: No
  • Provided link: No