CannerCMS/cannercms

Can't install @canner/cli

HausOfAlejandro opened this issue ยท 2 comments

Hello, I'm really excited to try Canner but I have some trouble in the installation process.

I can't install canner with the npm install --global @canner/cli command.

I think it's something realted with the unzip of the file downloaded by the installer in "postinstaller", but I don't know why.

Context:

  • Windows 10 64x
  • Node 11x (but also tried in Node 11.10.1)
  • Lastest Canner version (but also tried 3.2.3)

Behavior
Outputs this error:

        Welcome to CannerCMS!

>       ๐Ÿ‘ฅ   Join our community on spectrum: https://spectrum.chat/canner/cannercms
>       ๐Ÿ‘€   See more examples from CMS30: https://cms30.canner.io/
>       ๐Ÿ“”   Read our documents: https://www.cannercms.com/docs/start-quick-intro

> Downloading Canner CLI 3.2.4 [====                ] 19%
{ Error: invalid stored block lengths
    at Zlib.zlibOnError [as onerror] (zlib.js:162:17)
    at processChunkSync (zlib.js:405:12)
    at zlibBufferSync (zlib.js:148:12)
    at Object.syncBufferWrapper [as gunzipSync] (zlib.js:726:14)
    at C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:29931
    at x (C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:37191)
    at Generator._invoke (C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:36979)
    at Generator.e.(anonymous function) [as next] (C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:37370)
    at r (C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:39179)
    at s (C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\download\dist\download.js:127:39389) errno: -3, code: 'Z_DATA_ERROR' }
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @canner/cli@3.2.4 postinstall: `node download/install.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @canner/cli@3.2.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dell\AppData\Roaming\npm-cache\_logs\2019-03-01T22_32_32_244Z-debug.log
PS C:\wamp64\www\lab\canner1>

And if I open the log, this is the content:

1837 silly postinstall @canner/cli@3.2.4
1838 info lifecycle @canner/cli@3.2.4~postinstall: @canner/cli@3.2.4
1839 verbose lifecycle @canner/cli@3.2.4~postinstall: unsafe-perm in lifecycle true
1840 verbose lifecycle @canner/cli@3.2.4~postinstall: PATH: C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli\node_modules\.bin;C:\Users\Dell\AppData\Roaming\npm\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Common Files\Autodesk Shared\;C:\WINDOWS\System32\OpenSSH\;C:\wamp64\bin\php\php5.6.35;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\Dell\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Dell\AppData\Local\Programs\Python\Python37-32\;C:\Users\Dell\AppData\Local\Microsoft\WindowsApps;C:\Users\Dell\AppData\Local\atom\bin;C:\Program Files\Heroku\bin;C:\Users\Dell\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\Dell\AppData\Roaming\Composer\vendor\bin;C:\Users\Dell\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\Dell\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\Dell\AppData\Roaming\npm
1841 verbose lifecycle @canner/cli@3.2.4~postinstall: CWD: C:\Users\Dell\AppData\Roaming\npm\node_modules\@canner\cli
1842 silly lifecycle @canner/cli@3.2.4~postinstall: Args: [ '/d /s /c', 'node download/install.js' ]
1843 silly lifecycle @canner/cli@3.2.4~postinstall: Returned: code: 2  signal: null
1844 info lifecycle @canner/cli@3.2.4~postinstall: Failed to exec postinstall script
1845 timing action:postinstall Completed in 400739ms
1846 verbose unlock done using C:\Users\Dell\AppData\Roaming\npm-cache\_locks\staging-62449ae97f7948f5.lock for C:\Users\Dell\AppData\Roaming\npm\node_modules\.staging
1847 timing stage:rollbackFailedOptional Completed in 339ms
1848 timing stage:runTopLevelLifecycles Completed in 404890ms
1849 verbose stack Error: @canner/cli@3.2.4 postinstall: `node download/install.js`
1849 verbose stack Exit status 2
1849 verbose stack     at EventEmitter.<anonymous> (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
1849 verbose stack     at EventEmitter.emit (events.js:197:13)
1849 verbose stack     at ChildProcess.<anonymous> (C:\Users\Dell\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
1849 verbose stack     at ChildProcess.emit (events.js:197:13)
1849 verbose stack     at maybeClose (internal/child_process.js:984:16)
1849 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
1850 verbose pkgid @canner/cli@3.2.4
1851 verbose cwd C:\wamp64\www\lab\canner1
1852 verbose Windows_NT 10.0.17134
1853 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dell\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "@canner/cli"
1854 verbose node v11.10.1
1855 verbose npm  v6.8.0
1856 error code ELIFECYCLE
1857 error errno 2
1858 error @canner/cli@3.2.4 postinstall: `node download/install.js`
1858 error Exit status 2
1859 error Failed at the @canner/cli@3.2.4 postinstall script.
1859 error This is probably not a problem with npm. There is likely additional logging output above.
1860 verbose exit [ 2, true ]

It was solved when trying the installation in a different internet network, maybe if the download takes enough time the error occurs? :-)

Maybe it's a network issue. Let me know if you have further question.