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

Can`t resolve #app in a nuxt project since v3.1.1 #120

Closed
apss-pohl opened this issue Jul 1, 2022 · 14 comments · Fixed by #121
Closed

Can`t resolve #app in a nuxt project since v3.1.1 #120

apss-pohl opened this issue Jul 1, 2022 · 14 comments · Fixed by #121

Comments

@apss-pohl
Copy link

Sorry i haven't had much time the last days. Here is a repoduction:

https://codesandbox.io/s/nuxt3-eslint-import-4ytvs8?file=/apps/nuxt/src/app.vue
Would you mind to reopen the other issue (#117) and delete this one?

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

Would you mind to reopen the other issue (#117) and delete this one?

What the difference to keep this one? There is no reproduction in the original issue, that's why it is closed.


Thanks for the reproduction, but I don't know how to run the script in codesandbox, can you provide a GitHub repository instead? Export the codesandbox app into a repository for example.

@apss-pohl
Copy link
Author

Let me check how to export. In the meantime:
You can open a console following the red arrows and run "yarn lint" to reproduce. If you change back to 2.7 the error disappears.
image

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

I don't want to fork codesandbox (otherwise I don't have permission to create a new terminal), please provide a GitHub repository instead.

@apss-pohl
Copy link
Author

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

Here you are: apss-pohl/nuxt3-eslint-import2

Thanks then, I'll take a look when I'm free.

You can also help to debug if you want to contribute.

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

Where have you #app defined?

@apss-pohl
Copy link
Author

Where have you #app defined?

If is created once you run yarn dev or similar. It will create a folder .nuxt containing the required tsconfig.json:
image

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

gitpod /workspace/nuxt3-eslint-import2 (main) $ yarn dev
yarn run v1.22.19
$ yarn nuxt nuxi dev
$ /workspace/nuxt3-eslint-import2/node_modules/.bin/nuxt nuxi dev
Nuxt CLI v3.0.0-rc.4-27609974.fe508f5                                                                                                                                                07:19:43
                                                                                                                                                                                     07:19:43
Invalid command nuxi
Usage: npx nuxi dev|build|preview|start|analyze|generate|prepare|typecheck|usage|info|init|create|upgrade|test|add|new [args]                                                        07:19:43

Use npx nuxi [command] --help to see help for each command                                                                                                                           07:19:43

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm just getting more and more confused, please provide reproduce steps...

@apss-pohl
Copy link
Author

Assumed it would work ootb from codesandbox. I fixed the build, should be good to go now.

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

Thanks, just found the bug, working on a fix.

@apss-pohl
Copy link
Author

Awesome, thank you so much!

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

@apss-pohl Please try

# yarn 1
yarn add https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/16d9e762/eslint-import-resolver-typescript
# yarn 2, 3
yarn add eslint-import-resolver-typescript@https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/16d9e762/eslint-import-resolver-typescript/_pkg.tgz
# npm
npm i https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/16d9e762/eslint-import-resolver-typescript

I confirm it is working on your reproduction.

@apss-pohl
Copy link
Author

Works like a charm on my other project!

@JounQin
Copy link
Collaborator

JounQin commented Jul 1, 2022

@apss-pohl

eslint-import-resolver-typescript@3.1.3 has been released.

And thanks for the reproduction again, it saves both of our time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants