tabris-js: Build & Serve Fails

Problem description

Building (local and remote) and serving both fail. You can see the project I’m attempting to run here.

Building

The same error occurs when building with the CLI at 3.0.0-beta1 or at nightly (3.0.0-beta1-dev.20190225)

Output
</ PS C:\Users\USER\Documents\APP_App\theAPPapp> tabris run android
[./] npm run --if-present build:android
[./] npm run --if-present build
[./] Copying Cordova files to build/cordova ...
[./] Copying JavaScript files to build\cordova\www\app ...
[build\cordova\www\app] npm install --production
added 3 packages from 11 contributors and audited 205 packages in 2.171s
found 0 vulnerabilities
[./] Replacing variables in config.xml...
[C:\Users\USER\AppData\Roaming\npm\node_modules\tabris-cli\src\services] npm bin
[build/cordova] C:\Users\USER\AppData\Roaming\npm\node_modules\tabris-cli\node_modules\.bin\cordova platform add C:\Users\USER\.tabris-cli\platforms\android\3.0.0-beta2-dev.20190225 --no-update-notifier
Adding android project...
Running command: cmd "/s /c "C:\Users\USER\.tabris-cli\platforms\android\3.0.0-beta2-dev.20190225\bin\create.bat C:\Users\USER\Documents\APP_App\theAPPapp\build\cordova\platforms\android com.theAPPcompany.APP APP --cli""
internal/modules/cjs/loader.js:583
    throw err;
    ^
Error: Cannot find module 'cordova-common'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (C:\Users\USER\.tabris-cli\platforms\android\3.0.0-beta2-dev.20190225\bin\create:22:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error: cmd: Command failed with exit code 1
The command C:\Users\USER\AppData\Roaming\npm\node_modules\tabris-cli\node_modules\.bin\cordova exited with 1

Serving

With CLI at 3.0.0-beta1, there is no error and it prints [iOS][iPhone9,1][1]: connected, but the developer app screen is completely blank and nothing prints to the console.

With CLI at nightly (3.0.0-beta1-dev.20190225), the following occurs when the developer app connects to the serve:

Output
[iOS][iPhone9,1][1]: connected
Could not load main module: Error: Could not parse ./src/hello.js:TypeError: tabris._client.execute is not a function. (In 'tabris._client.execute(e,t)', 'tabris._client.execute' is undefined)
  at createLoader (./node_modules/tabris/boot.min.js:271:24)
  at a (./node_modules/tabris/boot.min.js:1:2287)
  at i (./node_modules/tabris/boot.min.js:1:1967)
  at i (./node_modules/tabris/boot.min.js:1:2044)
  at ./node_modules/tabris/boot.min.js:1:1277
  at value (./node_modules/tabris/boot.min.js:1:1357)
  at o (./node_modules/tabris/boot.min.js:1:3349)
  at subscribe (file:///var/containers/Bundle/Application/CF38650F-3094-42DA-8351-EEA0C2E6E024/Tabris.js.app/www/cordova.js:713:16)
  at addEventListener (file:///var/containers/Bundle/Application/CF38650F-3094-42DA-8351-EEA0C2E6E024/Tabris.js.app/www/cordova.js:133:43)
  at file:///var/containers/Bundle/Application/CF38650F-3094-42DA-8351-EEA0C2E6E024/Tabris.js.app/www/cordova.js:1428:34
  at _start (./node_modules/tabris/boot.min.js:1:3505)

Local Environment

  • Windows 10
  • Tabris Version: nightly (3.0.0-beta2-dev.20190225)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Could not load main module: Error: Could not parse ./src/app.js:TypeError: tabris._client.execute is not a function

This seems to indicate that the native platform is older than the CLI needs. This would be expected if you combine the beta1 developer app with the nightly build CLI. If you build your nightly-based app with debug flag and use the developer side console to enter the IP the CLI prints it should work.

If this turns out to be correct I could just add another check to ensure this kind of missmatach produces a better error.

@raphaelpreston What version do you have in package.lock?

3.0.0-beta1-dev.20190226 hasn’t published yet; it will be in about 3 hours. You can check the Versions tab here for the releases, or see the link to the diff above and manually patch it on your system.

ok thanks. we can reproduce the issue in the nightly and will fix it asap