question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build & Serve Fails

See original GitHub issue

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)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tbuschtocommented, Feb 28, 2019
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.

1reaction
cookiegurucommented, Feb 28, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI suddenly fails on serve and build - Stack Overflow
I am working on this angular CLI project and all of a sudden it started to fail on serve/build with the following error:...
Read more >
nx build and serve fails to fetch libraries for node apps #3074
Failure Information (for bugs). It started happening suddenly. I get the above error for every library I'm trying to import into my nodejs...
Read more >
ng serve fails but ng build works : r/angular - Reddit
Yeah so the title is quite self-explanatory, i can run ng build without any problems. But if I try to use ng serve...
Read more >
TeamCity On-Premises - Build Failure Conditions - JetBrains
The if an error message is logged by build runner condition marks the build as failed if the build runner reports an error...
Read more >
Npm Run Build Failed - Render community
Hi There, I am deploying my app and the build failed with the following error ... or update the “Root Directory” in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found