Strapi CKEditor5 deployment problem, module not found

my deployments are failing when adding a plugin to strapi and i’m trying to just track down where the problem is. here are my deployment logs:

==> Running 'yarn start'
INFOyarn run v1.22.22
INFO$ strapi start
DEBUG[2024-04-14 12:58:15.539] debug: ⛔️ Server wasn't able to start properly.
ERROR[2024-04-14 12:58:15.540] error: Cannot find module '/opt/render/project/src/src/plugins/strapi-plugin-ckeditor/package.json'
INFORequire stack:
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/Strapi.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/action.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/command.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/cli.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/bin/strapi.js
ERRORError: Cannot find module '/opt/render/project/src/src/plugins/strapi-plugin-ckeditor/package.json'
INFORequire stack:
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/Strapi.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/action.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/command.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/cli.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/bin/strapi.js
INFO    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
INFO    at Module._load (node:internal/modules/cjs/loader:984:27)
INFO    at Module.require (node:internal/modules/cjs/loader:1231:19)
INFO    at require (node:internal/modules/helpers:179:18)
INFO    at /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js:92:27
INFO    at /opt/render/project/src/node_modules/lodash/lodash.js:4967:15
INFO    at baseForOwn (/opt/render/project/src/node_modules/lodash/lodash.js:3032:24)
INFO    at /opt/render/project/src/node_modules/lodash/lodash.js:4936:18
INFO    at Function.forEach (/opt/render/project/src/node_modules/lodash/lodash.js:9410:14)
INFO    at Module.getEnabledPlugins (/opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js:83:22)
ERRORerror Command failed with exit code 1.
INFOinfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
INFO==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys
INFO==> Requesting node version >=18.0.0 <=20.x.x
INFO==> Using Node version 20.12.2 via /opt/render/project/src/package.json
INFO==> Docs on specifying a Node version: https://render.com/docs/node-version
INFO==> Using Bun version 1.1.0 (default)
INFO==> Docs on specifying a bun version: https://render.com/docs/bun-version
INFO==> Running 'yarn start'
INFOyarn run v1.22.22
INFO$ strapi start
DEBUG[2024-04-14 12:58:22.030] debug: ⛔️ Server wasn't able to start properly.
ERROR[2024-04-14 12:58:22.031] error: Cannot find module '/opt/render/project/src/src/plugins/strapi-plugin-ckeditor/package.json'
INFORequire stack:
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/Strapi.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/action.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/command.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/cli.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/bin/strapi.js
ERRORError: Cannot find module '/opt/render/project/src/src/plugins/strapi-plugin-ckeditor/package.json'
INFORequire stack:
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/Strapi.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/action.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/actions/admin/create-user/command.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/commands/index.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/dist/cli.js
INFO- /opt/render/project/src/node_modules/@strapi/strapi/bin/strapi.js
INFO    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
INFO    at Module._load (node:internal/modules/cjs/loader:984:27)
INFO    at Module.require (node:internal/modules/cjs/loader:1231:19)
INFO    at require (node:internal/modules/helpers:179:18)
INFO    at /opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js:92:27
INFO    at /opt/render/project/src/node_modules/lodash/lodash.js:4967:15
INFO    at baseForOwn (/opt/render/project/src/node_modules/lodash/lodash.js:3032:24)
INFO    at /opt/render/project/src/node_modules/lodash/lodash.js:4936:18
INFO    at Function.forEach (/opt/render/project/src/node_modules/lodash/lodash.js:9410:14)
INFO    at Module.getEnabledPlugins (/opt/render/project/src/node_modules/@strapi/strapi/dist/core/loaders/plugins/get-enabled-plugins.js:83:22)
ERRORerror Command failed with exit code 1.
INFOinfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

i’m not sure why it’s looking for this path when it looks like it has an extra src in there. i’m guessing that render is using opt/render/project/src/ as the folder so the double src is to be expected

Cannot find module '/opt/render/project/src/src/plugins/strapi-plugin-ckeditor/package.json'

here’s my root package.json:

{
  "workspaces": [
    "./src/plugins/*"
  ],
  "dependencies": {
    "@ckeditor/strapi-plugin-ckeditor": "^0.0.11",
    "@strapi/plugin-cloud": "4.17.0",
    "@strapi/plugin-i18n": "4.17.0",
    "@strapi/plugin-users-permissions": "4.17.0",
    "@strapi/provider-upload-cloudinary": "^4.17.0",
    "@strapi/strapi": "4.17.0",
    "pg": "8.8.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "5.3.4",
    "styled-components": "5.3.3"
  },
  "devDependencies": {},
  "engines": {
    "node": ">=18.0.0 <=20.x.x",
    "npm": ">=6.0.0"
  },
}

just for the sake of convo, there is a package.json here: src/plugins/strapi-plugin-ckeditor/package.json

my config/env plugin.js (also have copied this info into the env folder this is failing on):

module.exports = ({ env }) => ({
  upload: {
    config: {
      provider: "cloudinary",
      providerOptions: {
        cloud_name: env("CLOUDINARY_NAME"),
        api_key: env("CLOUDINARY_KEY"),
        api_secret: env("CLOUDINARY_SECRET"),
      },
    },
  },
  ckeditor: {
    enabled: true,
    resolve: "./src/plugins/strapi-plugin-ckeditor",
  },
});

kind of at a loss on where to look and trying to determine if i have a render setting misconfigured somewhere

Hey,

The first ‘src’ is set by Render and it points to the root location of your project in the filesystem. The second ‘src’ is the src directory of your project that you specified.

It’s tough to pinpoint the cause of the error without seeing how your project is structured after deployment. There could be an issue with the path, or maybe the plugin isn’t being installed correctly. While we offer limited code-level support, you can always reach out through the ‘Contact Support’ form on your dashboard if you need more help.

Jérémy.
Render Support, UTC+3