Skip to content

Compile Error - Initializers are not allowed in ambient conditions #8840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
crowmagnumb opened this issue Sep 9, 2020 · 1 comment · Fixed by #8837
Closed

Compile Error - Initializers are not allowed in ambient conditions #8840

crowmagnumb opened this issue Sep 9, 2020 · 1 comment · Fixed by #8837

Comments

@crowmagnumb
Copy link
Contributor

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

$ nsc info
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.0.7 version and is up to date.
✔ Component @nativescript/core has 7.0.1 version and is up to date.
✔ Component @nativescript/ios has ~7.0.0 version and is up to date.
✔ Component @nativescript/android has 7.0.0 version and is up to date.

Describe the bug

Upon compile ng build <myproj> --prod I get the following ...

ERROR: node_modules/@nativescript/core/application/index.d.ts:60:42 - error TS1039: Initializers are not allowed in ambient contexts.

60 export let autoSystemAppearanceChanged = true;

To Reproduce

Expected behavior

Sample project

Additional context

@crowmagnumb
Copy link
Contributor Author

Commenting the line out by editing ...

nano node_modules/@nativescript/core/application/index.d.ts

... seems to have no ill-effect but fixes the compile issue.

@rigor789 rigor789 linked a pull request Sep 9, 2020 that will close this issue
NathanWalker pushed a commit that referenced this issue Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant