toeverything / blocksuite

🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.
https://blocksuite.io
Mozilla Public License 2.0
4.24k stars 378 forks source link

Dependency issue in react project #6494

Closed jyotipravatiitm closed 5 months ago

jyotipravatiitm commented 5 months ago

Unable to integrate this into existing react project, getting below error

Module not found: Error: Can't resolve './copilot-service' in '/Users/jyotip/Codebase/dopcumentation-opensource-docusaurus/node_modules/.pnpm/@blocksuite+presets@0.13.0-canary-202403160534-05a3c47_yjs@13.6.14/node_modules/@blocksuite/presets/dist/fragments/copilot-panel'
Did you mean 'index.js'?
BREAKING CHANGE: The request './copilot-service' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
[WARNING] {"moduleIdentifier":"/Users/jyotip/Codebase/dopcumentation-opensource-docusaurus/node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.0_webpack@5.90.3/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!/Users/jyotip/Codebase/dopcumentation-opensource-docusaurus/src/editor/editor.ts","moduleName":"./src/editor/editor.ts","loc":"1:491-500","message":"export 'Workspace' (imported as 'Workspace') was not found in '@blocksuite/store' (possible exports: ASTWalker, AssetsManager, AwarenessStore, BaseAdapter, BaseBlockTransformer, BaseReactiveYData, BlockModel, BlockSchema, BlockSnapshotSchema, BlockSuiteDoc, Boxed, CollectionInfoSnapshotSchema, Doc, DocCollection, DocSnapshotSchema, Generator, Job, MemoryBlobManager, ReactiveYArray, ReactiveYMap, Schema, Slice, SliceSnapshotSchema, Slot, Space, Store, Text, Utils, collectionMigrations, createAutoIncrementIdGenerator, createAutoIncrementIdGeneratorByClientId, createIndexeddbStorage, createMemoryStorage, createSimpleServerStorage, createYProxy, defineBlockSchema, docMigrations, fromJSON, getAssetName, internalPrimitives, isPureObject, nanoid, native2Y, popProp, sha, stashProp, toJSON, uuidv4, y2Native)"}
doodlewind commented 5 months ago

@joshirakesh thanks for your feedback, could you share you project config, or could you reproduce this in the react-basic or react-basic-next example bundle setup?