Skip to content
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

Does not compile #4666

Closed
ghost opened this issue Apr 12, 2020 · 6 comments
Closed

Does not compile #4666

ghost opened this issue Apr 12, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 12, 2020

This is on [email protected] with Windows, tsc Version 3.5.3, npm 6.14.4

> tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly

src/compiler/compile/nodes/Attribute.ts:127:21 - error TS2339: Property 'node' does not exist on type 'Expression | Text'.
  Property 'node' does not exist on type 'Text'.

127               this.chunks[0].node.type !== "Identifier" ||
                                 ~~~~

src/compiler/compile/nodes/Attribute.ts:128:42 - error TS2339: Property 'node' does not exist on type 'Expression | Text'.
  Property 'node' does not exist on type 'Text'.

128               this.scope.names.has(this.chunks[0].node.name)
                                                      ~~~~

src/compiler/compile/render_dom/wrappers/Element/index.ts:372:30 - error TS2339: Property 'data' does not exist on type 'Wrapper'.

372                                     this.fragment.nodes[0].data
                                                               ~~~~

To reproduce run npm run build in a newly cloned repo.

@Conduitry
Copy link
Member

Sounds like a duplicate of #4482. If you're installing dependencies with Yarn, you shouldn't be.

@ghost
Copy link
Author

ghost commented Apr 12, 2020

No, I'm using npm. Forgot to add.

@Conduitry
Copy link
Member

🤷‍♂️ I can't reproduce this with a fresh clone. package-lock.json specifies typescript version 3.5.3 so if you have 3.8.3 (currently the latest version), something's not installing correctly.

@ghost
Copy link
Author

ghost commented Apr 12, 2020

Local tsc inside node_modules is version 3.5.3 sorry.

@ghost
Copy link
Author

ghost commented Apr 12, 2020

Adding node: any and data: string to the types fixed it but a different one showed up. See https://github.com/nhristov/svelte/commit/e1d5ead24cfb1974f4129ca1c9cbff9f971b511d for the fix.

@ghost ghost closed this as completed Apr 12, 2020
@ghost
Copy link
Author

ghost commented Apr 12, 2020

Apologies my formatter moved the // @ts-ignore comments thus allowing for the errors to show up. Everything works great with a fresh clone.

This issue was closed.
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

No branches or pull requests

1 participant