Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Cannot find name #40

Open
jannomeister opened this issue Feb 28, 2020 · 4 comments
Open

Cannot find name #40

jannomeister opened this issue Feb 28, 2020 · 4 comments
Labels
question Further information is requested

Comments

@jannomeister
Copy link

I'm using the latest version of NS

Screen Shot 2020-02-28 at 9 26 07 AM

@jannomeister
Copy link
Author

possible fix: #39

@Codex-
Copy link
Contributor

Codex- commented Mar 3, 2020

I've tested this via the Angular demo provided in this project, by bumping the versions to the latest version of NativeScript & NativeScript-Angular.

The compilation succeeds, all of the tests pass on both iOS and Android.

I've also attempted to recreate this in an external project using npm instead of the demo sourcing methods, these tests also failed to reproduce the issue you're seeing here.

I would suspect that you're using an old webpack config, or not depending on tns-core-modules or @nativescript/core.

Can you please provide a sample project that reproduces the issue you're seeing?

@bradmartin
Copy link
Collaborator

Ah so the image shows the error pointing to native iOS/android types. Which are being used in this plugin/module, your project shouldn't be analyzing node_modules at all IMO, unless you want TS to analyze all of the node_modules for types, which is slower to do and you shouldn't really have a need to do this.

Just add skipLibCheck: true to your tsconfig of your project. I made a PR for this on the NS templates a couple months ago because they were still shipping this flag false which resulted in users encountering this issue a while back.

@bradmartin bradmartin added the question Further information is requested label Mar 4, 2020
@jannomeister
Copy link
Author

thanks @bradmartin I'll try this one later :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants