intellij does not import member of javascript module
已回答
I made a test.mjs in a directory (export const a = 1;)
and I tried to use 'import { } from './test.mjs'; and Ctrl+space
it does not show a variable
请先登录再写评论。
Could you please provide a screenshot showing the mentioned source file and the project structure in IntelliJ - showing the file?
Also, please provide your log files (Help > Collect Logs and Diagnostic Data). You can upload the zip file here.
Just provide the uploaded file ID. Thanks!
zip all? could you list file name?
I uploaded screenshots :>
2023_02_20_eEodHqE9qz1sS2J9nkbA8D
When you execute Help > Collect Logs and Diagnostic Data there should be one .zip file generated and selected automatically in your file explorer.
It is called similar to this: idea-logs-<date>-<time>.zip. Please upload this file to our server: https://uploads.jetbrains.com
On the screenshot, I cannot see the test.mjs file. Is it possible to also share the zipped project folder - so that we can try to reproduce the issue on our side? Thanks!
I uploaded
2023_02_20_D7UgnVxANkwsKX7yXE6YPE
Thanks for the logs.
Is it possible to share also the zipped project folder? To check the project configuration and structure?
And to try to reproduce on our side.
of course, there is no test.mjs because it was just for test. and it did not work
2023_02_20_5sfoixo1C7YXVcSWVg4f72
here
And I'm using vscode for javascript now. it works well
it works fine for me when using your code snippet and steps:
could you check if you can reproduce the issue in a new empty project, after adding test.mjs to it?
as you mentioned, I do 'new project' -> select javascript, then it works too like it.
In case of the project having problem about this post,
I made a directory(rust-solana project) -> init npm to use javascript also
I think intellij want to think it is not javascript project
Please could you share a complete project you have issues with, including the .idea folder?
Here
2023_02_22_L5uULqBhamocLr1co2EKSf
your
.ideafiles are likely broken, themodules.xmlis missing. Deleting and re-creating.ideafolder should help:.ideafolder and the*.imlfiles (if any)Thanks! it works
Could you check @solana/web3.js ?
I think it does not work with autocomplete
Please follow https://youtrack.jetbrains.com/issue/WEB-59651/named-imports-from-solana-web3.js-are-not-resolved for updates