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

[BUG]: Can't build strapi admin panel anymore #378

Closed
bitmonti opened this issue Nov 13, 2023 · 6 comments · Fixed by #387
Closed

[BUG]: Can't build strapi admin panel anymore #378

bitmonti opened this issue Nov 13, 2023 · 6 comments · Fixed by #387

Comments

@bitmonti
Copy link

bitmonti commented Nov 13, 2023

Describe the bug
Opened issue #18711

To Reproduce
Steps to reproduce the behavior:

Git repository: link

  1. npm install
  2. npm run build

Stackblitz: link

  1. npm rebuild
  2. npm run build

System:

Ubuntu 22.04.3 LTS
node: v18.17.1
npm: v9.6.7

Plugin config
Please add your plugin config here, e.g.

module.exports = {
    translate: {
      enabled: true,
      config: {
        provider: "deepl",
        providerOptions: {
          apiKey: env("DEEPL_API_PROFESSIONAL"),
          apiUrl: env("DEEPL_API_URL"),
        },
      },
    },
}
@marioguima
Copy link

marioguima commented Nov 13, 2023

First, I want to thank you for your excellent work. This plugin saves my life every day by saving time and effort. Congratulations again.

Unfortunately, I got the same error.
If I uninstall the plugin, the admin compiles correctly
How the @bitmonti commented on issues #18711

@esiao
Copy link

esiao commented Nov 15, 2023

The issue is likely on this import

import useContentTypePermissions from '@strapi/plugin-i18n/admin/src/hooks/useContentTypePermissions'

@layaxx
Copy link
Member

layaxx commented Nov 16, 2023

Hey guys,
thanks for raising this Issue and for providing a reproduction repo.
I think @esiao is correct, although this is not the only import from the i18n plugin package causing this problem.
The problem is not even that those files are missing, they are just not marked as being exported in the package.json file.
I will look into possible solutions, but can unfortunately not give you any timeframe right now.

layaxx added a commit that referenced this issue Nov 16, 2023
…om plugin-i18n

The i18n plugin has added the "exports" field to its package.json file, preventing direct import of
some utilities that need here. Instead of the import, the needed functions are now added here
directly with some minor modifications

fix #378
fekide-bot pushed a commit that referenced this issue Nov 19, 2023
## [1.2.4](https://github.com/Fekide/strapi-plugin-translate/compare/[email protected]@1.2.4) (2023-11-19)

### Bug Fixes

* **admin:** fix admin panel failing to build due to direct imports from plugin-i18n ([8afb7ba](8afb7ba)), closes [#378](#378)
fekide-bot pushed a commit that referenced this issue Nov 19, 2023
## [1.1.12](https://github.com/fekide/strapi-plugin-translate/compare/strapi-provider-translate-deepl@[email protected]) (2023-11-19)

### Bug Fixes

* **admin:** fix admin panel failing to build due to direct imports from plugin-i18n ([8afb7ba](8afb7ba)), closes [#378](#378)
@fekide-bot
Copy link

🎉 This issue has been resolved in version 1.0.11 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@fekide-bot
Copy link

🎉 This issue has been resolved in version 1.2.4 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@fekide-bot
Copy link

🎉 This issue has been resolved in version 1.1.12 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

yansorau pushed a commit to yansorau/strapi-plugin-translate that referenced this issue Dec 6, 2024
…om plugin-i18n

The i18n plugin has added the "exports" field to its package.json file, preventing direct import of
some utilities that need here. Instead of the import, the needed functions are now added here
directly with some minor modifications

fix Fekide#378
yansorau pushed a commit to yansorau/strapi-plugin-translate that referenced this issue Dec 6, 2024
## [1.2.4](https://github.com/Fekide/strapi-plugin-translate/compare/[email protected]@1.2.4) (2023-11-19)

### Bug Fixes

* **admin:** fix admin panel failing to build due to direct imports from plugin-i18n ([8afb7ba](Fekide@8afb7ba)), closes [Fekide#378](Fekide#378)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants