I have successfully deploy Strapi on DO’s App Platform. However, when I had upgrade the rich text editor to CKEditor (on local env everything is working) and push it to App Platform I am facing the build error.
Error: msg
Error: Module not found: Error: Can’t resolve ‘@ckeditor/ckeditor5-react’ in ‘/workspace/plugins/wysiwyg/admin/src/components/CKEditor’
App Platform Build console log:
[cms-do] [2021-10-04 08:14:36] Project contains yarn.lock, using yarn
[cms-do] [2021-10-04 08:14:36] Reusing cached node_modules from yarn.lock
[cms-do] [2021-10-04 08:14:54] Running custom build command: DATABASE_URL=$DATABASE_URL NODE_ENV=production yarn build
[cms-do] [2021-10-04 08:14:55] yarn run v1.22.15
[cms-do] [2021-10-04 08:14:55] $ strapi build
[cms-do] [2021-10-04 08:14:57] Building your admin UI with production configuration …
[cms-do] [2021-10-04 08:15:00] Compiling Webpack
[cms-do] [2021-10-04 08:15:29] Error: Module not found: Error: Can’t resolve ‘@ckeditor/ckeditor5-react’ in ‘/workspace/plugins/wysiwyg/admin/src/components/CKEditor’
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/strapi-admin/index.js:71:23
[cms-do] [2021-10-04 08:15:29] at finalCallback (/workspace/node_modules/webpack/lib/Compiler.js:257:39)
[cms-do] [2021-10-04 08:15:29] at onCompiled (/workspace/node_modules/webpack/lib/Compiler.js:265:20)
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/webpack/lib/Compiler.js:670:21
[cms-do] [2021-10-04 08:15:29] at eval (eval at create (/workspace/node_modules/tapable/lib/HookCodeFactory.js:33:10), :28:1)
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/webpack/lib/Compilation.js:1173:13
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/webpack/lib/Compilation.js:1096:25
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/webpack/lib/Compilation.js:1017:13
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/neo-async/async.js:2830:7
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/neo-async/async.js:2830:7
[cms-do] [2021-10-04 08:15:29] at done (/workspace/node_modules/neo-async/async.js:2863:11)
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/neo-async/async.js:2818:7
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/webpack/lib/Compilation.js:1017:13
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/neo-async/async.js:2830:7
[cms-do] [2021-10-04 08:15:29] at /workspace/node_modules/neo-async/async.js:2830:7
[cms-do] [2021-10-04 08:15:29] at done (/workspace/node_modules/neo-async/async.js:2863:11)
[cms-do] [2021-10-04 08:15:29] error Command failed with exit code 1.
[cms-do] [2021-10-04 08:15:29] info Visit yarn run | Yarn for documentation about this command.
[cms-do] [2021-10-04 08:15:29] building: exit status 1
[cms-do] [2021-10-04 08:15:29] ERROR: failed to build: exit status 1
[cms-do] [2021-10-04 08:15:40]
[cms-do] [2021-10-04 08:15:40] For documentation on the buildpacks used to build your app, please see:
[cms-do] [2021-10-04 08:15:40] Node.js: NodeJS Buildpack on App Platform :: DigitalOcean Documentation
[cms-do] [2021-10-04 08:15:40]
[cms-do] [2021-10-04 08:15:40] ! Build failed (145)
Please see also the content of both package.json files:
Content of ./plugins/wysiwyg/package.json
{
"name": "strapi-plugin-wysiwyg",
"version": "0.0.0",
"description": "This is the description of the plugin.",
"strapi": {
"name": "wysiwyg",
"icon": "plug",
"description": "Description of wysiwyg plugin."
},
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^30.0.0",
"@ckeditor/ckeditor5-react": "^3.0.2"
},
"author": {
"name": "A Strapi developer",
"email": "",
"url": ""
},
"maintainers": [
{
"name": "A Strapi developer",
"email": "",
"url": ""
}
],
"engines": {
"node": ">=10.16.0 <=14.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
and
Content of ./package.json
{
"name": "sec-cms-do",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"knex": "0.21.18",
"pg": "8.5.1",
"pg-connection-string": "^2.5.0",
"strapi": "3.6.8",
"strapi-admin": "3.6.8",
"strapi-connector-bookshelf": "3.6.8",
"strapi-plugin-content-manager": "3.6.8",
"strapi-plugin-content-type-builder": "3.6.8",
"strapi-plugin-email": "3.6.8",
"strapi-plugin-i18n": "3.6.8",
"strapi-plugin-upload": "3.6.8",
"strapi-plugin-users-permissions": "3.6.8",
"strapi-provider-upload-do": "^3.6.6",
"strapi-utils": "3.6.8"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "0b438b19-c14d-4385-939c-c793513e2c78"
},
"engines": {
"node": ">=10.16.0 <=14.x.x",
"npm": "^6.0.0"
},
"license": "MIT"
}