NativeScript / canvas

Apache License 2.0
88 stars 18 forks source link

nx run demo:ios - *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught SyntaxError: Unexpected token '!' #6

Closed sylwesterdigital closed 4 years ago

sylwesterdigital commented 4 years ago

➜ canvas git:(master) npm start

> canvas@0.0.0 start /Users/misiak/Desktop/2020/canvas
> nps

nps is executing `default` : nps-i
? NativeScript Plugins ~ made with ❤️  Choose a command to start... default                                   
nps is executing `default` : nps-i
? NativeScript Plugins ~ made with ❤️  Choose a command to start... (Use arrow k                      ^[[B^[[A^[[B
eys or type to search)
❯ default                                    
  nx                                        Execute any command with the @nrwl/c
^C 
➜  canvas git:(master) npm start

> canvas@0.0.0 start /Users/misiak/Desktop/2020/canvas
> nps

nps is executing `default` : nps-i
? NativeScript Plugins ~ made with ❤️  Choose a command to start... apps.demo.ios                             ⚆  Run iOS  
nps is executing `apps.demo.ios` : nx run demo:ios

> nx run demo:ios 
Searching for devices...
Preparing project...
File change detected. Starting incremental webpack compilation...

webpack is watching the files…

Hash: d3fca0a87c7cca1006e3
Version: webpack 4.44.2
Time: 21077ms
Built at: 09/21/2020 22:34:49
       Asset      Size   Chunks             Chunk Names
   bundle.js   823 KiB   bundle  [emitted]  bundle
package.json  1.73 KiB           [emitted]  
  runtime.js  13.9 KiB  runtime  [emitted]  runtime
   vendor.js  6.12 MiB   vendor  [emitted]  vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
[./ sync ^\.\/app\.(css|scss|less|sass)$] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 174 bytes {bundle} [built]
[./ sync recursive (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$] . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$ 773 bytes {bundle} [built]
[./app-root.xml] 309 bytes {bundle} [optional] [built]
[./app.css] 651 bytes {bundle} [optional] [built]
[./app.ts] 1.63 KiB {bundle} [built]
[./main-page.ts] 411 bytes {bundle} [optional] [built]
[./main-page.xml] 1.36 KiB {bundle} [optional] [built]
[./main-view-model.ts] 496 bytes {bundle} [built]
[./plugin-demos/canvas-babylon.ts] 507 bytes {bundle} [optional] [built]
[./plugin-demos/canvas-babylon.xml] 1.01 KiB {bundle} [optional] [built]
[./plugin-demos/canvas-phaser-ce.ts] 853 bytes {bundle} [optional] [built]
[./plugin-demos/canvas-phaser-ce.xml] 1.66 KiB {bundle} [optional] [built]
[./plugin-demos/canvas-phaser.ts] 503 bytes {bundle} [optional] [built]
[./plugin-demos/canvas-phaser.xml] 943 bytes {bundle} [optional] [built]
[./plugin-demos/canvas-pixi.ts] 495 bytes {bundle} [optional] [built]
    + 385 hidden modules

WARNING in /Users/misiak/Desktop/2020/canvas/packages/canvas/index.ts 2:0-34
"export 'CanvasRenderingContext' was not found in './common'
 @ ./plugin-demos/canvas-babylon.xml
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-babylon.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-babylon.ts 1:0-55 6:31-54
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-phaser.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-phaser.ts 1:0-54 6:31-53
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-phaser-ce.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-phaser-ce.ts 1:0-56 20:31-55
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-pixi.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-pixi.ts 1:0-52 6:31-51
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-polyfill.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-polyfill.ts 1:0-56 6:31-55
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas-three.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas-three.ts 1:0-53 6:31-52
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts

ERROR in ./plugin-demos/canvas.ts
Module not found: Error: Can't resolve '@demo/shared' in '/Users/misiak/Desktop/2020/canvas/apps/demo/src/plugin-demos'
 @ ./plugin-demos/canvas.ts 1:0-48 6:31-47
 @ . sync (?<!\bApp_Resources\b.*)(?<!\.\/\btests\b\/.*?)\.(xml|css|js|(?<!\.d\.)ts|(?<!\b_[\w-]*\.)scss)$
 @ ./app.ts
Webpack compilation complete. Watching for file changes.
Webpack build done!
Installing pods...
Analyzing dependencies
Downloading dependencies
Installing CanvasNative (0.9.0)
Installing MDFInternationalization (2.0.0)
Installing MaterialComponents (94.5.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `demo.xcworkspace` for this project from now on.
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.

[!] Smart quotes were detected and ignored in your Podfile. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Building project...
Xcode requires a team id to be specified when building for device.
You can specify the team id by setting the DEVELOPMENT_TEAM setting in build.xcconfig file located in App_Resources folder of your app, or by using the --teamId option when calling run, debug or livesync commands.
Found and using the following development team installed on your system: S Mielniczuk (5P9V78UZAC)
Xcode build...
2020-09-21 22:35:21.556 xcodebuild[3232:27368]  DTDeviceKit: deviceType from 67aa538833c1a210861c965520352375116d4678 was NULL
Xcode build...
2020-09-21 22:36:31.731 xcodebuild[3739:29848] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/m6/3gy_fdtx795fbqn26p8mc3z40000gn/T/demo_2020-09-21_22-36-31.730.xcdistributionlogs'.
Exported demo to: /Users/misiak/Desktop/2020/canvas/apps/demo/platforms/ios/build/Debug-iphoneos
** EXPORT SUCCEEDED **

Project successfully built.
The build result is located at: /Users/misiak/Desktop/2020/canvas/apps/demo/platforms/ios/build/Debug-iphoneos/demo.ipa
Installing on device 67aa538833c1a210861c965520352375116d4678...
Successfully installed on device with identifier '67aa538833c1a210861c965520352375116d4678'.
Restarting application on device 67aa538833c1a210861c965520352375116d4678...
Unzipping LiveSync folder. This could take a while...
Unzipped 4 entries in 688.670039ms.
tns_modules folder not livesynced. Using tns_modules from the already deployed bundle...
'--chrome' is the default behavior. Use --inspector to debug iOS applications using the Safari Web Inspector.

Setting up debugger proxy...
Press Ctrl + C to terminate, or disconnect.

Opened localhost 41000
To start debugging, open the following URL in Chrome:
devtools://devtools/bundled/inspector.html?ws=localhost:41000

Successfully synced application org.nativescript.plugindemo on device 67aa538833c1a210861c965520352375116d4678.
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught SyntaxError: Unexpected token '!'
at
require(:1:137)
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught SyntaxError: Unexpected token '!'
at
require(:1:137)
', reason: '(null)'
*** First throw call stack:
(0x1afe32180 0x1af00a9f8 0x100875428 0x100c264f0 0x100c26354 0x100b3b08c 0x100a70828 0x100a6fe60 0x1008eae18 0x100829df0 0x100824ab0 0x10086a508 0x100097338 0x1af8818e0)
triniwiz commented 4 years ago

If you're building with Xcode 12 to a real device it's currently not supported (should be fixed in a few days on the cli) what you can do is updated to the latest rc for the cli an use a simulator , also you can try the build.all before running to ensure everything was built

triniwiz commented 4 years ago

Try pulling an building again .. I added a missing file