eclipsesource / tabris-js

Create native mobile apps in JavaScript or TypeScript.
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
1.4k stars 172 forks source link

Cordova error on run #2238

Open adminy opened 1 year ago

adminy commented 1 year ago

Problem description

I'm trying to run the app on a device or simulator with

> NODE_OPTIONS='--trace-warnings' tabris run ios --emulator

[./] npm run --if-present build:ios
[./] npm run --if-present build

> build
> tsc -p .

[./] Copying Cordova files to build/cordova ...
[./] Removing old JavaScript files in build/cordova/www/app ...
[./] Copying JavaScript files to build/cordova/www/app ...
[build/cordova/www/app] npm install --production
npm WARN config production Use `--omit=dev` instead.

added 1 package, and audited 2 packages in 2s

found 0 vulnerabilities
[./] Replacing variables in config.xml...
[build/cordova] /Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/.bin/cordova platform add /Users/adminy/.tabris-cli/platforms/ios/3.8.0 --no-update-notifier
(node:55375) Warning: Accessing non-existent property '/Users/adminy/.tabris-cli/platforms/ios/3.8.0' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:718:11)
    at Object.get (node:internal/modules/cjs/loader:734:5)
    at Object.hostSupports (/Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/cordova-lib/src/cordova/util.js:83:22)
    at addHelper (/Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/cordova-lib/src/cordova/platform/addHelper.js:47:27)
    at Function.add (/Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/cordova-lib/src/cordova/platform/index.js:27:12)
    at /Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/cordova-lib/src/cordova/platform/index.js:71:35
CordovaError: Could not determine package name from output:
up to date, audited 3 packages in 659ms

found 0 vulnerabilities
    at getTargetPackageSpecFromNpmInstallOutput (/Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/cordova-fetch/index.js:104:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 0,
  context: undefined
}
The command /Users/adminy/.tabris-cli/cordova/9.0.0/node_modules/.bin/cordova exited with 1

Expected behavior

Build and run with no problems

Environment

Code snippet

Base app, no changes.

cookieguru commented 1 year ago

Did you add the correct build key? You might try deleting the /Users/adminy/.tabris-cli folder and try again

adminy commented 1 year ago

yes I added the correct tabris key, copy pasted it

cookieguru commented 1 year ago

Are you using Node 16? I wonder if https://github.com/eclipsesource/tabris-js-cli/pull/88 could be the cause