Topic: Can't install Pro via npm with what looks to be valid token

matt.savastio free asked 3 years ago


Expected behavior Trying to install via npm:

npm install git+https://oauth2:xxxx@git.mdbootstrap.com/mdb/react/re-pro.git --save

Actual behavior

npm ERR! Cannot read property 'match' of undefined

Resources (screenshots, code snippets etc.) xxxx = my API token

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'git+https://oauth2:xxxx@git.mdbootstrap.com/mdb/react/re-pro.git',
1 verbose cli   '--save'
1 verbose cli ]
2 info using npm@6.12.0
3 info using node@v12.13.0
4 verbose npm-session b72e068944866152
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 info lifecycle mdbreact@5.0.2~prepack: mdbreact@5.0.2
8 info lifecycle mdbreact@5.0.2~postpack: mdbreact@5.0.2
9 silly pacote git manifest for undefined@git+https://oauth2:xxxx@git.mdbootstrap.com/mdb/react/re-pro.git fetched in 8664ms
10 timing stage:loadCurrentTree Completed in 10504ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 17ms
14 silly install loadShrinkwrap
15 timing stage:rollbackFailedOptional Completed in 0ms
16 timing stage:runTopLevelLifecycles Completed in 10544ms
17 silly saveTree zoho-rest-react@0.1.0
18 verbose stack TypeError: Cannot read property 'match' of undefined
18 verbose stack     at tarballToVersion (C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:87:20)
18 verbose stack     at inflatableChild (C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:99:22)
18 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:55:12
18 verbose stack     at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
18 verbose stack     at Object.gotValue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:155:18)
18 verbose stack     at Object.gotAccum (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:144:25)
18 verbose stack     at Object.tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
18 verbose stack     at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:517:31)
18 verbose stack     at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:574:18)
18 verbose stack     at Promise._settlePromiseCtx (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:611:10)
18 verbose stack     at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
18 verbose stack     at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
18 verbose stack     at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5)
18 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
18 verbose stack     at processImmediate (internal/timers.js:439:21)
19 verbose cwd C:\Users\matthew.savastio.VPL\Documents\Zoho Widgets\zoho-rest-react
20 verbose Windows_NT 10.0.19042
21 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "git+https://oauth2:xxxx@git.mdbootstrap.com/mdb/react/re-pro.git" "--save"
22 verbose node v12.13.0
23 verbose npm  v6.12.0
24 error Cannot read property 'match' of undefined
25 verbose exit [ 1, true ]

Krzysztof Wilk staff commented 3 years ago

In the topic specification, I see that you are using the MDB5 1.0.0-beta6 package. Error log above concerns that you are trying to install the MDB4 React Pro one. If you are using MDB5 one - please check this page with the installation guide (link to the repository in command is a little bit different) https://mdbootstrap.com/docs/b5/react/pro/installation/. If not - could you precise about which one you are using?

Keep coding!


matt.savastio free commented 3 years ago

I get the exact same error using that command when using either v4 or v5. I would prefer to use v5... but honestly I would just like to start using something that works! I purchased this a few months ago and while the documentation seems straightforward, I've been met with errors every time I try to install to an existing project.


matt.savastio free commented 3 years ago

I think I have this sorted out. I updated npm from a 12.x version to the current 14.x, then got a different error message about babel. I deleted my package.json file, then re-generated it with npm install. Then, I reran the mdb command for BS v5, and it looks like it took that time.


Krzysztof Wilk staff commented 3 years ago

I'm glad you figured it out! If you have any other questions - feel free to ask :)

Keep coding!



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: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 1.0.0-beta6
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No