strapi-community / strapi-plugin-protected-populate

MIT License
20 stars 5 forks source link

Errors while building in docker, use consistent case for imports #15

Closed cupofnestor closed 1 year ago

cupofnestor commented 1 year ago

I received the following error when attempting to build strapi admin in docker, based on the official docker guide, with this plugin in my package.json.

Module not found: Error: Can't resolve './components/PluginIcon' in '/opt/node_modules/strapi-plugin-protected-populate/admin/src'

The problem is case-inconsistency in the imports:

/admin/src/index.js

import PluginIcon from './components/PluginIcon';

Actual directory name is pluginIcon

image

I suggest that the resolution be to rename the /components/ subdirs consitently, in Bactrian case, and make sure that all imports are consistent with this.

Let me know if you'd like me to fork and create a MR.

Boegie19 commented 1 year ago

@cupofnestor If You want to make a PR to fix this I would be grateful and check if over and merge it as soon as I can.

I should have checked for that better but developed it on windows that auto correct for that.

cupofnestor commented 1 year ago

@Boegie19 no problem, I'll try to work on it today. We're using MacOS for dev so didn't notice it until I tried to dockerize for staging.