Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: npm installation of pro package is not working

nschlote priority asked 2 years ago


Expected behavior

npm to install mdb package from git repository in local repository

Actual behavior

npm shows the following error message:
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

Resources (screenshots, code snippets etc.)

Generated log file:

0 verbose cli C:\Program Files\nodejs\node.exe D:\Users\NSchlote\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@9.1.2
2 info using node@v18.12.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:D:\Users\NSchlote\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 5ms
6 timing config:load:builtin Completed in 5ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\Users\NSchlote\dev\First\dmig\.npmrc Completed in 1ms
10 timing config:load:project Completed in 4ms
11 timing config:load:file:D:\Users\NSchlote\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:D:\Users\NSchlote\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 18ms
17 timing npm:load:configload Completed in 19ms
18 timing npm:load:mkdirpcache Completed in 1ms
19 timing npm:load:mkdirplogs Completed in 1ms
20 verbose title npm i git+https://oauth2:***@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential
21 verbose argv "i" "git+https://oauth2:***@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential"
22 timing npm:load:setTitle Completed in 2ms
23 timing config:load:flatten Completed in 5ms
24 timing npm:load:display Completed in 6ms
25 verbose logfile logs-max:10 dir:D:\Users\NSchlote\AppData\Local\npm-cache\_logs\2022-11-29T12_53_34_981Z-
26 verbose logfile D:\Users\NSchlote\AppData\Local\npm-cache\_logs\2022-11-29T12_53_34_981Z-debug-0.log
27 timing npm:load:logFile Completed in 15ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 45ms
31 timing config:load:flatten Completed in 1ms
32 timing arborist:ctor Completed in 1ms
33 silly logfile start cleaning logs, removing 2 files
34 timing arborist:ctor Completed in 0ms
35 silly logfile done cleaning log files
36 timing idealTree:init Completed in 35ms
37 timing idealTree Completed in 82ms
38 timing command:i Completed in 95ms
39 verbose stack Error: An unknown git error occurred
39 verbose stack     at makeError (D:\Users\NSchlote\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\git\lib\make-error.js:28:13)
39 verbose stack     at D:\Users\NSchlote\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\git\lib\spawn.js:37:26
39 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
40 verbose cwd D:\Users\NSchlote\dev\First\dmig
41 verbose Windows_NT 10.0.19042
42 verbose node v18.12.1
43 verbose npm  v9.1.2
44 error code ENOENT
45 error syscall spawn git
46 error path git
47 error errno -4058
48 error enoent An unknown git error occurred
49 error enoent This is related to npm not being able to find a file.
49 error enoent
50 verbose exit -4058
51 timing npm Completed in 229ms
52 verbose unfinished npm timer reify 1669726415108
53 verbose unfinished npm timer reify:loadTrees 1669726415113
54 verbose unfinished npm timer idealTree:userRequests 1669726415151
55 verbose code -4058
56 error A complete log of this run can be found in:
56 error     D:\Users\NSchlote\AppData\Local\npm-cache\_logs\2022-11-29T12_53_34_981Z-debug-0.log

stefanvd priority answered 2 years ago


Hi,

I just joined mdb last week and now I have the same issue.

In the video tutorial from the complete order page:npm install git+https://oauth2:access_token@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential --save

In the documentation page:npm i git+https://oauth2:access_token@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential

Both don't work, resulting in this error:

PS C:\laragon\www\wynl> npm -v6.14.8PS C:\laragon\www\wynl> npm install git+https://oauth2:access_token@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essential --savenpm ERR! code ENOENTnpm ERR! syscall spawn gitnpm ERR! path gitnpm ERR! errno ENOENTnpm ERR! enoent Error while executing:npm ERR! enoent undefined ls-remote -h -t blank" rel="nofollow">https://oauth2:*_@git.mdbootstrap.com/mdb/standard/mdb-ui-kit-pro-essentialnpm ERR! enoentnpm ERR! enoentnpm ERR! enoent spawn git ENOENTnpm ERR! enoent This is related to npm not being able to find a file.npm ERR! enoent

npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2022-12-01T17_27_34_564Z-debug.log


nschlote priority commented 2 years ago

Stefan, I meanwhile got over the hump by cloning the GIT repository. Not the most elegant solution but I have now everything available to me. In a node project it is quite unusual to bind in JS and CSS files directly rather than going through npm install but I couldn't find a way to make that work otherwise.


stefanvd priority commented 2 years ago

Hi, and thanks for your comment! :)So I understand eventually you worked around the npm install completely. Nevertheless, I would like to find out what causes this, because it is step 1. in starting after purchasing, not quite hopeful for a beginner like me... so looking forward to the mdb support team's reply. Thanks!


Mateusz Lazaru staff commented 2 years ago

Do you have git installed? Try to run git --version in the terminal, where you are trying to install MDB and let me know what does it return.


stefanvd priority commented 2 years ago

Hi Mlazaru, my apologies for that, and thanks for hiding. Git is not installed I think - as you can see, I am new to this and now that you suggest this... the penny has dropped. DUH! Later this weekend I will continue and if you don't hear from me, it is solved. Many thanks!


Mateusz Lazaru staff answered 2 years ago


Hi,

Try to clear cache, delete node_modules and reinstall it:

npm cache clean -f
rm -rf node_modules
npm i

nschlote priority commented 2 years ago

Sorry, but what I was trying to is use npm (as described in the installation instructions for MDB) to install the initial package of files making up the MDB product. So I do not yet have anything in the cache nor do I have a node_modules folder yet since the npm command failed with the above error message.



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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.0.1
  • Device: Mac Studio
  • Browser: Chrome
  • OS: Windows 10 (AWS Workspaces)
  • Provided sample code: No
  • Provided link: No