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

Loading Strapi[ERROR] #45

Open
nansshan opened this issue Nov 22, 2024 · 0 comments
Open

Loading Strapi[ERROR] #45

nansshan opened this issue Nov 22, 2024 · 0 comments

Comments

@nansshan
Copy link

`zhu@zhudeMacBook-Pro strapi-nav % npm run develop

[email protected] develop
strapi develop

✔ Cleaning dist dir (14ms)
⠋ Loading Strapi[ERROR] There seems to be an unexpected error, try again with --debug for more information

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│ ││ Error: strapi-plugin-wysiwyg-react-md-editor couldn't be resolved ││ at toDetailedDeclaration (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/@strapi/core/dist/loaders/plugins/get ││ -enabled-plugins.js:65:17) ││ at ││ /Users/zhu/Documents/dazuoye/strapi-nav/node_modules/@strapi/core/dist/loaders/plugins/get-enabled-plugins.js:115:10 ││ at /Users/zhu/Documents/dazuoye/strapi-nav/node_modules/lodash/lodash.js:4967:15 ││ at baseForOwn (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/lodash/lodash.js:3032:24) ││ at /Users/zhu/Documents/dazuoye/strapi-nav/node_modules/lodash/lodash.js:4936:18 ││ at Function.forEach (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/lodash/lodash.js:9410:14) ││ at Module.getEnabledPlugins (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/@strapi/core/dist/loaders/plugins/ ││ get-enabled-plugins.js:112:22) ││ at async loadPlugins ││ (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/@strapi/core/dist/loaders/plugins/index.js:96:26) ││ at async Promise.all (index 3) ││ at async Module.loadApplicationContext ││ (/Users/zhu/Documents/dazuoye/strapi-nav/node_modules/@strapi/core/dist/loaders/index.js:12:3) ││
`

{ "name": "strapi-nav", "version": "0.1.0", "private": true, "description": "A Strapi application", "scripts": { "build": "strapi build", "deploy": "strapi deploy", "develop": "strapi develop", "seed:example": "node ./scripts/seed.js", "start": "strapi start", "strapi": "strapi" }, "dependencies": { "@strapi/plugin-cloud": "5.4.1", "@strapi/plugin-users-permissions": "5.4.1", "@strapi/strapi": "5.4.1", "@uiw/react-md-editor": "^4.0.4", "fs-extra": "^10.0.0", "mime-types": "^2.1.27", "mysql2": "3.9.8", "react": "^18.0.0", "react-dom": "^18.0.0", "react-router-dom": "^6.0.0", "strapi-plugin-wysiwyg-react-md-editor": "^5.0.2", "styled-components": "^6.0.0" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "typescript": "^5" }, "engines": { "node": ">=18.0.0 <=22.x.x", "npm": ">=6.0.0" }, "strapi": { "uuid": "69392e6d-a198-4b93-a681-9cba5df02b7e" } }

`import MDEditor from '@uiw/react-md-editor';

export default {
config: {
// 添加中文语言选项
locales: ['zh-Hans'],
// 可以同时添加其他翻译
translations: {
'zh-Hans': {
'Auth.form.email.label': '邮箱地址',
'app.components.LeftMenu.navbrand.title': 'Strapi 控制台',
// 其他翻译...
},
},
},
bootstrap(app) {
app.addFields([
{
type: 'wysiwyg',
Component: MDEditor,
}
]);
},
register({ strapi }) {
strapi.customFields.register({
name: 'wysiwyg',
plugin: 'wysiwyg-react-md-editor',
type: 'richtext',
});
},
};`

export default { // ...其他配置 "wysiwyg-react-md-editor": { enabled: true, resolve: 'strapi-plugin-wysiwyg-react-md-editor', config: { toolbarCommands: ["title1", "strapiMediaLibrary"], }, } };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant