[NPMCLI-182] CLI jumpstart fails - due to regression in adm-zip dependency Created: 17/May/18  Updated: 19/Dec/18  Resolved: 08/Jun/18

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

Type: Bug Priority: Critical
Reporter: Ervin Vystup Assignee: Federico Grilli
Resolution: Fixed Votes: 4
Labels: quickwin
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2018-05-17-14-22-53-743.png     PNG File image-2018-05-18-16-32-05-578.png     PNG File screenshot-1.png    
Issue Links:
Problem/Incident
Relates
relates to NPMCLI-185 Add an npm-shrinkwrap.json file to CL... Closed
causality
is causing NPMCLI-198 high-severity security vulnerability ... Closed
duplicate
is duplicated by NPMCLI-183 mgnl jumpstart gives error and does ... Closed
is duplicated by NPMCLI-181 Problem using jumpstart on Windows Closed
relation
is related to NPMCLI-186 Unpin adm-zip dependency or replace i... 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
Release notes required:
Yes
Date of First Response:
Epic Link: Support
Sprint: Basel 148
Story Points: 2

 Description   

Based on comments, this error is dependant on the version of node installed.

It seems it is a known issue: adm-zip issue.

The automaticly installed version 0.4.11 does not work.
Pinning "adm-zip" explictly to "0.4.7" instead of "^0.4.7" in the package.json fixes the issue.

 

 


Windows 7: 

The "mgnl jumpstart" command failed with the error: "No such file or directory ... \apache-tomcat\bin"

  • node.js: 8.11.1 and 8.11.2
  • cli: 3.0.0
  • npm: 5.6.0

 I think that the cause of this problem is here: https://git.magnolia-cms.com/projects/BUILD/repos/npm-cli/browse/lib/jumpstart.js#97

Windows 10NPMCLI-181

  • node.js: 8.11.1
  • cli 3.0.0
  • npm: 5.6.0

Linux

  • Linux Mint 18.03 (MATE)
  • nodejs 10.1.0
  • npm 5.6.0
  • CLI 2.2.0, CLI 3.0.0

 

  • Ubuntu MATE 16.04.4 LTS
  • CLI 2.2.0
  • node.js 9.11.1
  • npm 5.6.0

 

  • Ubuntu MATE 16.04.3 LTS, Linux Mint 18.03 (MATE)
  • CLI 3.0.0
  • node.js 8.11.2
  • npm 5.6.0

Mac OS X

  • Mac OS High Sierra 10.13.4
  • nodejs 8.11.2
  • npm 5.6.0
  • CLI 3.0.0

Install is successful on

  • Mac OS High Sierra 10.13.2
  • nodejs 8.9.1
  • npm 5.6.0
  • CLI 3.0.0

 

 

 



 Comments   
Comment by Martin Drápela [ 17/May/18 ]

Same issue on Linux.

Fresh installation of:

  • Ubuntu Mate 16.04.3 LTS (Xenial Xerus) 64-bit
  • Linux 4.4.0-119-generic x86_64
  • Magnolia CLI: 3.0.0 (node.js: v8.11.2)
  • npm 5.6.0
m@ubuntuMini:~/dev$ mgnl jumpstart
info Using configuration at /usr/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli.json
info Using prototypes at /usr/lib/node_modules/@magnolia/cli/lib/config/mgnl-cli-prototypes
? What Magnolia would you like to install? magnolia-enterprise-pro-demo-webapp
? Username: mdrapela
? Password: [hidden]
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 /home/m/dev/light-modules does not seem to exist. Path will be created automatically.
info Starting download from: https://nexus.magnolia-cms.com/service/local/artifact/maven/content?r=magnolia.public.releases&g=info.magnolia.tomcat.barebone&a=magnolia-tomcat-barebone&e=zip&v=LATEST
Downloading [====================] 100% 0.0s
info Starting download from: https://nexus.magnolia-cms.com/service/local/artifact/maven/content?r=magnolia.enterprise.releases&g=info.magnolia.eebundle&a=magnolia-enterprise-pro-demo-webapp&e=war&v=LATEST
Downloading [====================] 100% 0.0s
info Extracting...
info magnolia-tomcat-barebone-1.0/apache-tomcat-8.5.5/ to /home/m/dev/apache-tomcat
info /home/m/dev/home/m/dev/downloads/magnolia-enterprise-pro-demo-webapp-5.6.6.war to /home/m/dev/apache-tomcat/webapps/magnoliaAuthor
info Extraction completed
ERR! Error: ENOENT: no such file or directory, scandir '/home/m/dev/apache-tomcat/bin'

 

Comment by Martin Drápela [ 17/May/18 ]

And the same happening also on a fresh installation of Linux Mint 18.03 (MATE):

Comment by Christoph Meier [ 18/May/18 ]

F.Y.I.
At least on Mac it still works fine.

Comment by Christoph Meier [ 18/May/18 ]

I dare to rename this ticket - giving it an imho more descriptive name

Comment by Martin Drápela [ 18/May/18 ]

A quick workaround until this is fixed:

1) In the folder where you want to execute mgnl jumpstart, create first the apache-tomcat folder with the bin subfolder in it.
2) Execute mgnl jumpstart.

Comment by Peter Genov [ 18/May/18 ]

I have the same issue on Mac magnolia-cli 3.0, macOS High Sierra 10.13.4

Comment by Christoph Meier [ 18/May/18 ]

genov1824 - interesting.
On my mac , also on macOS High Sierra 10.13.4, it works fine.
I use Magnolia CLI: 3.0.0 (node.js: v8.9.2)

Which node version are you using?

Comment by Jiri Frkal [ 18/May/18 ]

On mac with versions

Magnolia CLI: 3.0.0 (node.js: v8.11.1)

npm version - 6.0.1

macOS High Sierra 10.13.4

works too.

 

Comment by Peter Genov [ 18/May/18 ]

I'm using node v "v8.10.0". Today I decided to update my magnolia cli from 2.2.0 to 3.0 and after that the problem occurred.

Comment by Martin Drápela [ 18/May/18 ]

I sense the issue is in some nodejs version and how it deals with path variables. 
I was able to replicate the problem also with CLI 2.2.0 (nodejs v9.11.1 on linux):

 And the mgnl 2.2.0 doesn't work with the latest nodejs 10.1.0 either on linux.

Comment by Lars Laade [ 31/May/18 ]

It seems it is an adm-zip issue.
The automaticly installed version 0.4.11 does not work on my system.
Pinning "adm-zip" explictly to "0.4.7" instead of "^0.4.7" in the package.json fixed the issue for me.

 

Comment by Christopher Zimmermann [ 06/Jun/18 ]

larslaade Good find, thanks for the tip!

 

Comment by Christopher Zimmermann [ 06/Jun/18 ]

I can confirm that "Pinning "adm-zip" explictly to "0.4.7" instead of "^0.4.7" in the package.json fixed the issue for me." fixes it for me on OSX (with node v8.11.2)

I can also confirm that the problem only started when upgrading node version from v8.9.1 to v8.11.2 

Comment by Christopher Zimmermann [ 06/Jun/18 ]

I can also confirm that this fixes the problem on Windows.

Comment by Christopher Zimmermann [ 06/Jun/18 ]

CLI version 3.0.1 should be published after this issue is resolved.

Comment by Mario Ammann [X] (Inactive) [ 07/Jun/18 ]

On Mac (Sierra) I had the same issue with different node.js versions. Adjusting the adm-zip to the explicit version 0.4.7 it worked.

I'm using NVM and the mgnl cli is located here:

~/.nvm/versions/node/v8.11.2/lib/node_modules/@magnolia/cli/

Following steps were necessary to fix:

  1. Open "../@magnolia/cli" (global) folder
  2. Adjust adm-zip verison within "../@magnolia/cli/package.json"
  3. Delete adm-zip from module folder "../@magnolia/cli/node_modules/adm-zip"
  4. Rerun "npm install" in root of @magnolia/cli Folder
Comment by Martin Drápela [ 07/Jun/18 ]

Tried the pinning also on the following Linux config and the jumpstart command works with it correctly too:

  1. npm 6.0.1
  2. Magnolia CLI: 3.0.0 (node.js: v9.11.1)
  3. Linux 4.13.0-41-generic #46~16.04.1-Ubuntu
Comment by Federico Grilli [ 08/Jun/18 ]

Also released 3.0.1 to npmjs public repo.

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