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
Cant build project with custom plugins [Typescript] #18912
Comments
Having the exact same issue in my project. |
Having exact same issue in my project with typescript the imports in app.js are messed up. The only way to make it work is run with --watch-admin and manually change the paths in app.js. Using @strapi/strapi version 4.15.4. |
"yarn develop" initially builds the project with plugins. The whole .strapi folder contents are getting replaced, when the app builds. |
Another problem is some plugins cannot be deleted: ➜ npm run strapi uninstall strapi-plugin-protected-populate
> strapi@0.1.0 strapi
> strapi uninstall strapi-plugin-protected-populate
? Do you want to delete the plugin generated files in the extensions folder ? Yes
Cannot find module '@strapi/plugin-strapi-plugin-protected-populate/package.json'
Require stack:
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/dist/load/package-path.js
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/dist/commands/actions/install/action.js
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/dist/commands/actions/install/command.js
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/dist/commands/index.js
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/dist/cli.js
- /Users/monolithed/workspace/pergum/strapi/node_modules/@strapi/strapi/bin/strapi.js |
Please try the |
Bug report
Required System information
Describe the bug
Building custom plugin fails. The plugin's source is not properly configured to generated/compiled properly results in the module not resolved error.
Steps to reproduce the behavior
Expected behavior
The Plugin should be added to the Side Navigation bar of the admin panel and accessible.
Screenshots
The auto-generated .strapi/client/app.js file below while running yarn build
.strapi/client/app.js
`/**
*/
import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin";
import i18N from "@strapi/plugin-i18n/strapi-admin";
import strapiCloud from "@strapi/plugin-cloud/strapi-admin";
import myplugin from "....srcpluginsmyplugin/strapi-admin";
import { renderAdmin } from "@strapi/strapi/admin";
renderAdmin(document.getElementById("strapi"), {
plugins: {
"users-permissions": usersPermissions,
i18n: i18N,
"strapi-cloud": strapiCloud,
myplugin: myplugin,
},
});
`
As you can see the import for the custom plugin "myplugin" is messed up or not generated correctly. This actually breaks whole building process and i cant use the plugins.
Additional Content
I have tried in various JS/TS environment combinations to check if this still a case for all possibilities.
The text was updated successfully, but these errors were encountered: