gbicou / directus-extension-tiptap

Tiptap rich text editor interface and display for directus
MIT License
67 stars 6 forks source link

Could not resolve dependency #93

Open kamil-malinski opened 10 months ago

kamil-malinski commented 10 months ago

Hi!

I'm running Directus 10.8.2 and I can not get this extension to install.

This is the error I'm getting when trying to install it:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: directus-cms@1.0.0
npm ERR! Found: vue@3.3.4
npm ERR! node_modules/vue
npm ERR!   peer vue@"3.3.4" from @directus/composables@10.1.6
npm ERR!   node_modules/@directus/composables
npm ERR!     @directus/composables@"10.1.6" from @directus/extensions-sdk@10.2.0
npm ERR!     node_modules/@directus/extensions-sdk
npm ERR!       @directus/extensions-sdk@"10.2.0" from @directus/api@14.1.2
npm ERR!       node_modules/@directus/api
npm ERR!         @directus/api@"14.1.2" from directus@10.8.2
npm ERR!         node_modules/directus
npm ERR!   vue@"3.3.4" from @directus/extensions-sdk@10.2.0
npm ERR!   node_modules/@directus/extensions-sdk
npm ERR!     @directus/extensions-sdk@"10.2.0" from @directus/api@14.1.2
npm ERR!     node_modules/@directus/api
npm ERR!       @directus/api@"14.1.2" from directus@10.8.2
npm ERR!       node_modules/directus
npm ERR!         directus@"10.8.2" from the root project
npm ERR!   5 more (@directus/types, @directus/utils, @vitejs/plugin-vue, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @bicou/directus-extension-tiptap@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.4.14
npm ERR! node_modules/vue
npm ERR!   peer vue@"^3.3.8" from @bicou/directus-extension-tiptap@1.13.1
npm ERR!   node_modules/@bicou/directus-extension-tiptap
npm ERR!     @bicou/directus-extension-tiptap@"*" from the root project

What am I doing wrong?

Cheers

Kamil

gbicou commented 9 months ago

Hi, can you provide your package.json file ? Thanks.

kamil-malinski commented 9 months ago
{
  "name": "directus",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "directus start",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "directus": "10.8.2",
    "directus-extension-searchsync": "github:kamil-malinski/directus-extension-searchsync",
    "mysql": "^2.18.1",
    "pm2": "^5.2.0"
  }
}
finnolin commented 8 months ago

Assuming this is the same issue, when I try to install tiptap it breaks all my other extenstions. (installed via the new marketplace) In the docker log i can see:

"@tiptap/pm/state" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/core" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/starter-kit" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-underline" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-text-align" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-character-count" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-subscript" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-superscript" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-highlight" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-typography" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-placeholder" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-link" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-focus" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-task-list" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-task-item" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-table" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-table-row" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-table-cell" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap/extension-table-header" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap-pro/extension-invisible-characters" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap-pro/extension-emoji" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap-pro/extension-emoji" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
"@tiptap-pro/extension-unique-id" is imported by "extensions/.registry/41f14135-af49-4c26-aaac-98a47ce6012e/dist/app.mjs", but could not be resolved – treating it as an external dependency.
gbicou commented 8 months ago

I think it's because the marketplace does not really install a package like npm or pnpm does, it just extracts the archive without dependencies. If you can add custom dependencies to the directus Docker... Or maybe I should add all tiptap dependencies directly into the extension...

finnolin commented 8 months ago

hmm, not sure what would be the best option I assume the marketplace is intended for people like me, who are not really comfortable messing around inside the docker container. maybe an additional section in the readme "installing via marketplace" would be sufficient... i don't know...