question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate is removing import names

See original GitHub issue

I have tried to follow the setup steps and I had a few problems:

  1. I needed to rename astro-i18next.config.js to astro-i18next.config.mjs
  2. when I run npx astro-i18next generate the existing astro file is modified and the new language one has the same issue - import statements by name are being corrupted. Example:

`import Layout from “…/layouts/Layout.astro”; import Card from “…/components/Card.astro”;

// becomes import “…/layouts/Layout.astro” from ; import “…/components/Card.astro” from ;`

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dallyhcommented, Sep 5, 2022

I can confirm that the issue is resolved on my end, although imports got duplicated because of my mistake.

0reactions
yassinedoghricommented, Sep 5, 2022

Alright, all good! Released the beta.9 just now and have tested it in 2 different projects. This issue can be closed, thanks for the feedback!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Go Code is removing a proper import even after adding it #1266
So I have a lib directory at the root of my project. I try to import it correctly: "github.com/package-name/lib". And this tool just...
Read more >
Any reason to clean up unused imports in Java, other than ...
One would be that if you remove the class referenced by the import from the classpath, you won't get ...
Read more >
Auto import | PyCharm Documentation - JetBrains
Basic procedures to create and optimize imports in PyCharm. Learn more how to import the missing import or XML namespace.
Read more >
Python import: Advanced Techniques and Tips
Remove ads. In Python, you use the import keyword to make code in one module available in another. Imports in Python are important...
Read more >
Review and troubleshoot import errors
Remove the duplicate in your import file and re-import. Duplicate unique property value. What the error means. The same unique value was used ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found