CannerCMS / cannercms

⚡️ Content Management Framework creates custom CMS fast and easy. Support data sources such as Firebase/Firestore, GraphQL and Restful APIs.
https://www.cannerdata.com
Apache License 2.0
2.42k stars 145 forks source link

UnhandledPromiseRejectionWarning: Error: File '/**/repo/packages/cli/node_modules/blessed/usr/xterm' was not included into executable on `canner start` #170

Open jarvainen opened 5 years ago

jarvainen commented 5 years ago

After installation, I'm trying to run canner start, but seems like blessed is missing xterm module in cli installation.

To Reproduce Steps to reproduce the behavior:

  1. Install canner-cli
  2. Run canner init
  3. Run canner start

Error message

(node:12449) UnhandledPromiseRejectionWarning: Error: File '/**/repo/packages/cli/node_modules/blessed/usr/xterm' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:422:17)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:650:29)
    at Object.fs.readFileSync (pkg/prelude/bootstrap.js:693:18)
    at Tput.readTerminfo (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:157:13)
    at Tput.compileTerminfo (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:623:28)
    at Tput.injectTerminfo (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:627:27)
    at Tput._useXtermInfo (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:118:15)
    at Tput.setup (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:92:10)
    at new Tput (/snapshot/repo/packages/cli/node_modules/blessed/lib/tput.js:63:10)
    at Program.setupTput (/snapshot/repo/packages/cli/node_modules/blessed/lib/program.js:251:26)
(node:12449) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12449) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/snapshot/repo/packages/cli/node_modules/blessed/lib/widgets/screen.js:309
  if (!this.program.isAlt) return;
                    ^

TypeError: Cannot read property 'isAlt' of undefined
    at Screen.leave (/snapshot/repo/packages/cli/node_modules/blessed/lib/widgets/screen.js:309:21)
    at Screen.destroy (/snapshot/repo/packages/cli/node_modules/blessed/lib/widgets/screen.js:411:8)
    at /snapshot/repo/packages/cli/node_modules/blessed/lib/widgets/screen.js:216:14
    at Array.forEach (<anonymous>)
    at process.Screen.bind.process.on.Screen._exceptionHandler (/snapshot/repo/packages/cli/node_modules/blessed/lib/widgets/screen.js:215:30)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process._fatalException (bootstrap_node.js:414:26)

Dependencies (please complete the following information):

jarvainen commented 5 years ago

Fixed by changing terminal program to Kitty.