Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NativeScript encountered a fatal error: Uncaught ReferenceError: __metadata is not defined #8872

Copy link
Copy link
Open
@terranc-gich

Description

@terranc-gich
Issue body actions

I have just migrated my project from NativeScript 6.5 to NativeScript 7.0. After fixing the import statements, the project is built successfully. However, when it runs (in emulator or hardware), the following error is encountered:

Webpack compilation complete. Watching for file changes.
Webpack build done!
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Installing on device 9DDC5F09-DF5B-4D33-9F96-C77B8A32A58B...
Successfully installed on device with identifier '9DDC5F09-DF5B-4D33-9F96-C77B8A32A58B'.
Successfully transferred all files on device 9DDC5F09-DF5B-4D33-9F96-C77B8A32A58B.
Restarting application on device 9DDC5F09-DF5B-4D33-9F96-C77B8A32A58B...
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught ReferenceError: __metadata is not defined
at
../node_modules/@nativescript/core/ui/styling/css-selector/index.js(file: node_modules/@nativescript/core/ui/styling/css-selector/index.js:82:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at (file: node_modules/@nativescript/core/ui/styling/style-scope.js:1:0)
at ../node_modules/@nativescript/core/ui/styling/style-scope.js(file:///app/vendor.js:39517:30)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view-base/index.js(file: node_modules/@nativescript/core/ui/core/view-base/index.js:1:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view/view-common.js(file: node_modules/@nativescript/core/ui/core/view/view-common.js:1:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view/index.js(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:1:0)
at webpack_require<…>
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught ReferenceError: __metadata is not defined
at
../node_modules/@nativescript/core/ui/styling/css-selector/index.js(file: node_modules/@nativescript/core/ui/styling/css-selector/index.js:82:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at (file: node_modules/@nativescript/core/ui/styling/style-scope.js:1:0)
at ../node_modules/@nativescript/core/ui/styling/style-scope.js(file:///app/vendor.js:39517:30)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view-base/index.js(file: node_modules/@nativescript/core/ui/core/view-base/index.js:1:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view/view-common.js(file: node_modules/@nativescript/core/ui/core/view/view-common.js:1:0)
at webpack_require(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/core/ui/core/view/index.js(file:///<…>

My environment / configuration:

  • OS: macOS 10.15.4
  • Xcode: 11.5
  • CLI: 7.0.8
  • Cross-platform modules: 7.0.3
  • Android Runtime: 7.0.0
  • iOS Runtime: 7.0.0
  • Plugin(s):

@nativescript/core ~7.0.0
datejs ^1.0.0-rc3
nativescript-awesome-webview-with-custom-menu-items ^40.1.1
nativescript-barcodescanner ^3.1.3
nativescript-clipboard ^1.2.0
nativescript-download-progress file:nativescript-download-progress-1.0.3.tar
nativescript-email ^1.5.2
nativescript-ios-uuid ^1.0.0
nativescript-md5 ^1.0.1
nativescript-pdf-view ^2.0.1
nativescript-permissions ^1.2.3
nativescript-phone ^1.3.1
nativescript-share-file file:nativescript-share-file-1.0.6.tgz
nativescript-theme-core ~1.0.4
nativescript-toast ^2.0.0
tslib ^1.2.0

Dev Dependencies:
@nativescript/android 7.0.0
@nativescript/ios 7.0.0
@nativescript/types 7.0.0
@nativescript/webpack ~3.0.0
babel-traverse ^6.26.0
babel-types ^6.26.0
babylon 6.4.5
lazy 1.0.11
typescript 3.9.7

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.