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

[ts] Declaration or statement expected. [1128] #206

Open
ingmontoya opened this issue Jan 20, 2019 · 4 comments
Open

[ts] Declaration or statement expected. [1128] #206

ingmontoya opened this issue Jan 20, 2019 · 4 comments

Comments

@ingmontoya
Copy link

i'm getting this error in my VS Code

[ts] Declaration or statement expected. [1128]
in the line :
export User, { schema } from './model'
located in every index.js file.
image

Please help

@kbzowski
Copy link
Contributor

kbzowski commented Mar 1, 2020

Export from syntax is somehow stale right now (still in stage 1): https://github.com/tc39/proposal-export-default-from. This syntax is not encouraged.

To make it work:

Replace in index.js:
export User, {schema} from './model'
with
import { schema } from './model'

Replace in controller.js
import { User } from '.'
with
import User from './model'

If I may suggest, Babel is a bit unnecessary in this project. You can simple replace it with esm package or just use Node 13 with native ESM support.

@GitHubBoy88
Copy link

I also had an error with that
Screen Shot 2022-02-16 at 8 04 11 PM
.

@Josh1540
Copy link

I also had an error with that Screen Shot 2022-02-16 at 8 04 11 PM .

Hello, having kind of the same problem here. Did you find the solution?

@mohamedaithamou
Copy link

if (condition) {

} else {

}

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

5 participants