Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problems #17

Closed
martinhbramwell opened this issue Dec 6, 2020 · 7 comments
Closed

Installation problems #17

martinhbramwell opened this issue Dec 6, 2020 · 7 comments
Assignees
Labels

Comments

@martinhbramwell
Copy link

I encountered some ambiguities and errors in installation instructions

  1. Instructions to install prerequisites don't specify whether they must be OS installed or npm installed.
  • git & gulp seem to need to be OS installed (apt, yum)
  • shelljs seems be an npm install
  • OS installing Node seems to force later npm global install to require sudo. Using nvm seems like a better way to install Node
  1. Neither sudo apt install git-scm nor npm install -g git-scm work at all. What is it?

  2. bookiza --version does not work (bookiza --VERSION does)

  3. Xubuntu 20.04 has done away with python2, so it also should be listed as a prerequisite.

  4. Then, showstopper bug apparently ...

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.13.1
    at module.exports (/home/erpdev/bookiza/bookiza.book/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/home/erpdev/bookiza/bookiza.book/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/erpdev/bookiza/bookiza.book/node_modules/gulp-sass/index.js:162:21)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)

but, in fact it was due to assuming nvm install node and nvm use node. Prerequisites should not specify simply Node >=8.11.3, instead it should be 8.11.2 < Node < 15. So ... nvm install 14 and nvm use 14, did work.

  1. With all the above solved, I have an apparently working "Heidi" book ... but then:
  • With Chrome (Version 86.0.4240.183) the front cover appears and a pulsating right vertical arrow bar. Clicking the bar causes the book to turn to the next page, spread to 100% browser width and then refuse to respond to any further event from keyboard or mouse.
  • With FireFox 83.0 it is possible to turn pages with the pulsating right and left vertical arrow bars, but nothing else works.
  1. template types, such as novella, magazine etc are suggested, but there is no documentation to give any idea what might be the differences and relative advantages of each one.
@martinhbramwell
Copy link
Author

you@yours:~/bookiza/heidi$ node --version
v14.15.1
you@yours:~/bookiza/heidi$ npm --version
6.14.8
you@yours:~/bookiza/heidi$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
you@yours:~/bookiza/heidi$ 

@marvindanig marvindanig self-assigned this Dec 7, 2020
@marvindanig
Copy link
Collaborator

I apologize that the experience of installation was less than ideal for your flavor of ubuntu distro. 😞

Installing node and and npm can get a little tricky, especially with libraries like the node-sass that are a part of the framework under the hood. I'm aware of these issues but the best guides on installing node and node-gyp/sass are available on the nodejs and elsewhere.

Coming to issues [3], [6], and [7] of documentation, templates and framework bugs.

I'll be taking some of these up tonight. I haven't had the time to complete Bookiza.js, and only a buggy version of it is currently deployed inside of the Bookiza framework (CLI). My hope is to replace that buggy lib with a new more complete version as soon as the spec of Superbook format is finalized. 🤞🏻

@marvindanig marvindanig added the bug label Dec 7, 2020
@martinhbramwell
Copy link
Author

Maybe this will help:

you@erpserver:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
you@erpserver:~$ 

you@erpserver:~$ git --version
git version 2.25.1
you@erpserver:~$ nvm install 14
Downloading and installing node v14.15.1...
Downloading https://nodejs.org/dist/v14.15.1/node-v14.15.1-linux-x64.tar.xz...
######################################################################################################################################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v14.15.1 (npm v6.14.8)
Creating default alias: default -> 14 (-> v14.15.1)
you@erpserver:~$ node --version
v14.15.1
you@erpserver:~$ npm i -g shelljs
/home/you/.nvm/versions/node/v14.15.1/bin/shjs -> /home/you/.nvm/versions/node/v14.15.1/lib/node_modules/shelljs/bin/shjs
+ [email protected]
added 19 packages from 17 contributors in 1.401s
you@erpserver:~$ npm i -g gulp
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
/home/you/.nvm/versions/node/v14.15.1/bin/gulp -> /home/you/.nvm/versions/node/v14.15.1/lib/node_modules/gulp/bin/gulp.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/gulp/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
added 322 packages from 220 contributors in 18.917s
you@erpserver:~$ npm i -g bookiza
/home/you/.nvm/versions/node/v14.15.1/bin/bookiza -> /home/you/.nvm/versions/node/v14.15.1/lib/node_modules/bookiza/bin/bin.js
/home/you/.nvm/versions/node/v14.15.1/bin/b -> /home/you/.nvm/versions/node/v14.15.1/lib/node_modules/bookiza/bin/bin.js

> [email protected] postinstall /home/you/.nvm/versions/node/v14.15.1/lib/node_modules/bookiza
> node ./scripts/displayLicense.js

   ____                 _     _                        _            _
  |  _ \               | |   (_)                /\    | |          | |
  | |_) |  ___    ___  | | __ _  ____ __ _     /  \   | |__    ___ | |  ___   _ __    ___
  |  _ <  / _ \  / _ \ | |/ /| ||_  // _` |   / /\ \  | '_ \  / _ \| | / _ \ | '_ \  / _ \
  | |_) || (_) || (_) ||   < | | / /| (_| |  / ____ \ | |_) ||  __/| || (_) || | | ||  __/
  |____/  \___/  \___/ |_|\_\|_|/___|\__,_| /_/    \_\|_.__/  \___||_| \___/ |_| |_| \___|


 > Visit [https://www.bookiza.io/](https://www.bookiza.io/) for documentation and licensing options.

 Copyright © 3rd millenium+ Marvin Danig, Sonica Arora and Bubblin Superbooks. 


 Installation is complete. Yay! 🍾

 Next step: Run $ bookiza register and pass your Bubblin credentials. 

 Visit: docs@bookiza for more information.
 Support: support@bookiza

+ [email protected]
added 123 packages from 84 contributors in 7.314s
you@erpserver:~$ bookiza --version
error: unknown option '--version'
you@erpserver:~$ 
you@erpserver:~$ bookiza -v
3.0.2
you@erpserver:~$ bookiza register
username: you
password: ************
Registration successful
you@erpserver:~$ bookiza new TNBC --leafs 12 --template magazine
Initializing…  [ manuscript=TNBC | leafs=12 | template=magazine ]
README initialization… :success.
Gitignoring… /build /node_modules :done.
License (blank) initialization:complete.
Applying a magazine layout… :success.
Mobilizing crust… :success.
Server setup… :completed.
PackageJson configured… :preparing for installation.
Default bookrc values… :done.
Generating [ 24 ] blank page(s)… : done.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> [email protected] install /home/you/TNBC/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-83_binding.node
Download complete  ] - :
Binary saved to /home/you/TNBC/node_modules/node-sass/vendor/linux-x64-83/binding.node
Caching binary to /home/you/.npm/node-sass/4.14.1/linux-x64-83_binding.node

> [email protected] postinstall /home/you/TNBC/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> [email protected] postinstall /home/you/TNBC/node_modules/node-sass
> node scripts/build.js

Binary found at /home/you/TNBC/node_modules/node-sass/vendor/linux-x64-83/binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] license should be a valid SPDX license expression

+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 862 packages from 539 contributors and audited 864 packages in 50.949s

15 packages are looking for funding
  run `npm fund` for details

found 7 vulnerabilities (4 low, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Installing npm modules… :successful.
you@erpserver:~$ cd TNBC/
you@erpserver:~/TNBC$ bookiza server
<ref *1> Command {
  _events: [Object: null prototype] {
    'option:port': [Function (anonymous)],
    '--help': [Function (anonymous)]
  },
  _eventsCount: 2,
  _maxListeners: undefined,
  commands: [],
  options: [
    Option {
      flags: '-p, --port <port>',
      required: true,
      optional: false,
      variadic: false,
      mandatory: false,
      short: '-p',
      long: '--port',
      negate: false,
      description: 'Optional port number',
      defaultValue: undefined
    }
  ],
  parent: Command {
    _events: [Object: null prototype] {
      'option:VERSION': [Function (anonymous)]
    },
    _eventsCount: 1,
    _maxListeners: undefined,
    commands: [
      [Command], [Command],
      [Command], [Command],
      [Command], [Command],
      [Command], [Command],
      [Command], [Circular *1],
      [Command], [Command],
      [Command]
    ],
    options: [ [Option] ],
    parent: null,
    _allowUnknownOption: false,
    _args: [],
    rawArgs: [
      '/home/you/.nvm/versions/node/v14.15.1/bin/node',
      '/home/you/.nvm/versions/node/v14.15.1/bin/bookiza',
      'server'
    ],
    _scriptPath: '/home/you/.nvm/versions/node/v14.15.1/bin/bookiza',
    _name: 'bookiza',
    _optionValues: {},
    _storeOptionsAsProperties: true,
    _storeOptionsAsPropertiesCalled: false,
    _passCommandToAction: true,
    _actionResults: [],
    _actionHandler: null,
    _executableHandler: false,
    _executableFile: null,
    _defaultCommandName: null,
    _exitCallback: null,
    _aliases: [],
    _hidden: false,
    _helpFlags: '-h, --help',
    _helpDescription: 'display help for command',
    _helpShortFlag: '-h',
    _helpLongFlag: '--help',
    _hasImplicitHelpCommand: undefined,
    _helpCommandName: 'help',
    _helpCommandnameAndArgs: 'help [command]',
    _helpCommandDescription: 'display help for command',
    _version: '3.0.2',
    _versionOptionName: 'VERSION',
    args: [ 'server' ],
    [Symbol(kCapture)]: false
  },
  _allowUnknownOption: false,
  _args: [],
  rawArgs: null,
  _scriptPath: null,
  _name: 'server',
  _optionValues: {},
  _storeOptionsAsProperties: true,
  _storeOptionsAsPropertiesCalled: false,
  _passCommandToAction: true,
  _actionResults: [],
  _actionHandler: [Function: listener],
  _executableHandler: false,
  _executableFile: null,
  _defaultCommandName: null,
  _exitCallback: null,
  _aliases: [ 's' ],
  _hidden: false,
  _helpFlags: '-h, --help',
  _helpDescription: 'display help for command',
  _helpShortFlag: '-h',
  _helpLongFlag: '--help',
  _hasImplicitHelpCommand: 0,
  _helpCommandName: 'help',
  _helpCommandnameAndArgs: 'help [command]',
  _helpCommandDescription: 'display help for command',
  _description: 'Start server',
  _argsDescription: undefined,
  args: [],
  [Symbol(kCapture)]: false
}
(node:4067) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4067) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:4067) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
[debug] -> Starting Step: Finding an empty port
[debug] Found a free port: 4567
[debug] Setting Option: port - 4567
[debug] +  Step Complete: Finding an empty port
[debug] -> Starting Step: Getting an extra port for Proxy
[debug] +  Step Complete: Getting an extra port for Proxy
[debug] -> Starting Step: Checking online status
[debug] Resolved www.google.com, setting online: true
[debug] Setting Option: online - true
[debug] +  Step Complete: Checking online status
[debug] -> Starting Step: Resolve user plugins from options
[debug] +  Step Complete: Resolve user plugins from options
[debug] -> Starting Step: Set Urls and other options that rely on port/online status
[debug] Setting multiple Options
[debug] +  Step Complete: Set Urls and other options that rely on port/online status
[debug] -> Starting Step: Setting Internal Events
[debug] +  Step Complete: Setting Internal Events
[debug] -> Starting Step: Setting file watchers
[debug] +  Step Complete: Setting file watchers
[debug] -> Starting Step: Merging middlewares from core + plugins
[debug] Setting Option: middleware - List []
[debug] +  Step Complete: Merging middlewares from core + plugins
[debug] -> Starting Step: Starting the Server
[debug] Static Server running (http) ...
[debug] Running mode: SERVER
[debug] +  Step Complete: Starting the Server
[debug] -> Starting Step: Starting the HTTPS Tunnel
[debug] +  Step Complete: Starting the HTTPS Tunnel
[debug] -> Starting Step: Starting the web-socket server
[debug] Setting Option: clientEvents - List [ "scroll", "scroll:element", "input:text", "input:toggles", "form:submit", "form:reset", "click" ]
[debug] +  Step Complete: Starting the web-socket server
[debug] -> Starting Step: Starting the UI
[debug] Setting Option: session - 1607372351296
[UI] Starting Step: Setting default plugins
[UI] Step Complete: Setting default plugins
[UI] Starting Step: Finding a free port
[UI] Step Complete: Finding a free port
[UI] Starting Step: Setting options also relevant to UI from BS
[UI] Step Complete: Setting options also relevant to UI from BS
[UI] Starting Step: Setting available URLS for UI
[debug] Getting option via path: [ 'urls' ]
[UI] Step Complete: Setting available URLS for UI
[UI] Starting Step: Starting the Control Panel Server
[UI] Using port 3001
[UI] Step Complete: Starting the Control Panel Server
[UI] Starting Step: Add element events
[UI] Step Complete: Add element events
[UI] Starting Step: Registering default plugins
[UI] Step Complete: Registering default plugins
[UI] Starting Step: Add options setting event
[UI] Step Complete: Add options setting event
[debug] +  Step Complete: Starting the UI
[debug] -> Starting Step: Merge UI settings
[debug] Setting Option: urls - Map { "local": "http://localhost:4567", "external": "http://192.168.122.117:4567", "ui": "http://localhost:3001", "ui-external": "http://localhost:3001" }
[debug] +  Step Complete: Merge UI settings
[debug] -> Starting Step: Init user plugins
[debug] Setting Option: userPlugins - 
[debug] +  Step Complete: Init user plugins
[Browsersync] Access URLs:
 ----------------------------------------
       Local: http://localhost:4567
    External: http://192.168.122.117:4567
 ----------------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
 ----------------------------------------
[Browsersync] Serving files from: ./
[Browsersync] 1 file changed (index.html)
[Browsersync] Reloading Browsers...
[Browsersync] Browser Connected: Firefox, version: 83.0
[Browsersync] Browser Connected: Firefox, version: 83.0
             :      :     :      :     :      :     :      :     :      :     :
             :      :     :      :     :      :     :      :     :      :     :
             :      :     :      :     :      :     :      :     :      :     :
             :      :     :      :     :      :     :      :     :      :     :

Firefox starts and displays a single black page with a grey arrow bar.
Clicking the grey bar gets a full width black page and then nothing works. -i does not open the console window, though it is available from the menu.

@marvindanig
Copy link
Collaborator

Ah, I see. It's probably related to this issue with node earlier.

On the Heidi book, I recommend npm update the dependencies or better still copy the package.json from a more recent project and then npm update that. If it helps kickstart the server on the book––feel free to submit the updated package.json as a PR on Github.

LMK how it goes!

@martinhbramwell
Copy link
Author

So I cloned the Bookiza manual from GitHub

It opens with the flapping butterfly title page full width of the page. No controls work.

Console shows

Uncaught TypeError: _book.state.animations.book is undefined
    _turnTheBook http://localhost:4567/crust/scripts/bookiza.js:631
    _openTheBook http://localhost:4567/crust/scripts/bookiza.js:614
    mutator http://localhost:4567/crust/scripts/bookiza.js:847

@marvindanig
Copy link
Collaborator

Yeah, this is from that bookiza.js that isn't complete. Since I publish books by converting markdowns into Superbooks automatically, I do not have to start the bookiza server to view the book on the browser most of the time.

I guess there's no way around this now. Will take up rewriting bookiza.js next.

@martinhbramwell
Copy link
Author

OUCH! Wut?

So I will have no way to use bookiza, for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants