[NPMCLI-227] CLI jumpstart: Object.values is not a function Created: 01/Aug/19  Updated: 11/May/20  Resolved: 11/May/20

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: 3.1.0
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Bhupesh Belchandan Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX 10.14.5


Issue Links:
relation
is related to NPMCLI-239 ERR! Cannot read property 'status' of... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When running:

mgnl jumpstart -m 6.1

with option 2, i.e. magnolia-community-webapp

getting following error:

mgnl jumpstart -m 6.1
info Using configuration at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli.json
info Using prototypes at /usr/local/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli-prototypes
? What Magnolia would you like to install? magnolia-community-webapp
ERR! Object.values is not a function
ERR! TypeError: Object.values is not a function
ERR! at Object.when (/usr/local/lib/node_modules/@magnolia/cli/bin/mgnl-jumpstart.js:79:25)
ERR! at /usr/local/lib/node_modules/@magnolia/cli/node_modules/run-async/index.js:25:25
ERR! at /usr/local/lib/node_modules/@magnolia/cli/node_modules/run-async/index.js:24:19
ERR! at DeferSubscriber.Rx.Observable.defer [as factory] (/usr/local/lib/node_modules/@magnolia/cli/node_modules/inquirer/lib/ui/prompt.js:109:32)
ERR! at DeferSubscriber._callFactory (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/observable/DeferObservable.js:92:27)
ERR! at DeferSubscriber.tryDefer (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/observable/DeferObservable.js:85:18)
ERR! at new DeferSubscriber (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/observable/DeferObservable.js:81:14)
ERR! at DeferObservable._subscribe (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/observable/DeferObservable.js:71:16)
ERR! at DeferObservable.Observable._trySubscribe (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/Observable.js:172:25)
ERR! at DeferObservable.Observable.subscribe (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/Observable.js:160:93)
ERR! at Object.subscribeToResult (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/util/subscribeToResult.js:23:27)
ERR! at MergeMapSubscriber._innerSub (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/operators/mergeMap.js:132:38)
ERR! at MergeMapSubscriber._tryNext (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/operators/mergeMap.js:129:14)
ERR! at MergeMapSubscriber._next (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/operators/mergeMap.js:112:18)
ERR! at MergeMapSubscriber.Subscriber.next (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/Subscriber.js:93:18)
ERR! at MergeMapSubscriber.notifyNext (/usr/local/lib/node_modules/@magnolia/cli/node_modules/rxjs/operators/mergeMap.js:145:30)
ERR!
ERR!
ERR! mgnl: 3.1.0 node: v6.11.2 os: darwin
ERR! please open an issue including this log on https://jira.magnolia-cms.com/browse/NPMCLI



 Comments   
Comment by Christopher Zimmermann [ 05/Aug/19 ]

Hi there, I just tried it locally on MacOS and it is working on at least one machine.

I notice from your logs that you are running node v6.11.12 which is from 2017.

Could you try updating your node to a newer version (for example the latest LTS (10.16.1) and try again and let us know what happens?

https://nodejs.org/en/download/

Comment by Bhupesh Belchandan [ 19/Aug/19 ]

Thanks Christopher and apology for such late response.

Will try updating my node version sometime soon, for this project started with available bundle and thus have workaround in Magnolia and that's great

Comment by Jojo Joy [ 26/Sep/19 ]

From Windows:

 

C:\Users\user\dev>mgnl jumpstart
info Using configuration at C:\Users\user\AppData\Roaming\npm\node_modules@magnolia\cli\lib\config\mgnl-cli.json
info Using prototypes at C:\Users\user\AppData\Roaming\npm\node_modules@magnolia\cli\lib\config\mgnl-cli-prototypes
? What Magnolia would you like to install? magnolia-community-demo-webapp
info No magnolia-version option provided. Will use the latest stable version.
info No path option provided. Will use the default light-modules in the current directory
ERR! Cannot read property 'status' of undefined
ERR! TypeError: Cannot read property 'status' of undefined
ERR! at handleError (C:\Users\user\AppData\Roaming\npm\node_modules@magnolia\cli\lib\download.js:29:20)
ERR! at axios.get.then.catch (C:\Users\user\AppData\Roaming\npm\node_modules@magnolia\cli\lib\download.js:94:5)
ERR! at process._tickCallback (internal/process/next_tick.js:68:7)
ERR!
ERR!
ERR! mgnl: 3.1.0 node: v10.16.3 os: win32
ERR! please open an issue including this log on https://jira.magnolia-cms.com/browse/NPMCLI

Comment by Jojo Joy [ 26/Sep/19 ]

And this is from Mac:

user@machine ~/dev $> mgnl jumpstart
info Using configuration at /Users/user/.npm-global/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli.json
info Using prototypes at /Users/user/.npm-global/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli-prototypes
? What Magnolia would you like to install? magnolia-community-demo-webapp
info No magnolia-version option provided. Will use the latest stable version.
info No path option provided. Will use the default light-modules in the current directory
info /Users/user/dev/light-modules does not seem to exist. Path will be created automatically.
ERR! Cannot read property 'status' of undefined
ERR! TypeError: Cannot read property 'status' of undefined
ERR! at handleError (/Users/user/.npm-global/lib/node_modules/@magnolia/cli/lib/download.js:29:20)
ERR! at /Users/user/.npm-global/lib/node_modules/@magnolia/cli/lib/download.js:94:5
ERR! at processTicksAndRejections (internal/process/task_queues.js:93:5)
ERR!
ERR!
ERR! mgnl: 3.1.0 node: v12.11.0 os: darwin
ERR! please open an issue including this log on https://jira.magnolia-cms.com/browse/NPMCLI

Comment by Bryan Lewis [ 18/Apr/20 ]

I'm getting this error as well: 

 

ERR! Cannot read property 'status' of undefined

ERR! TypeError: Cannot read property 'status' of undefined

ERR!     at handleError (/usr/local/lib/node_modules/@magnolia/cli/lib/download.js:29:20)

ERR!     at /usr/local/lib/node_modules/@magnolia/cli/lib/download.js:94:5

ERR!     at processTicksAndRejections (internal/process/task_queues.js:97:5)

ERR!

ERR!

ERR! mgnl: 3.1.0 node: v12.16.2 os: darwin

ERR! please open an issue including this log on https://jira.magnolia-cms.com/browse/NPMCLI

Comment by Maxime Michel [ 11/May/20 ]

Object.values is not a function is due to too old of a Node version, as can be seen on the following page: https://node.green/#ES2017-features-Object-static-methods-Object-values

I am therefore closing this ticket and will create a new one for the issue reported in comments.

Generated at Mon Feb 12 04:47:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.