Closed zaaakher closed 8 months ago
I might be missing something,
What do you use to automate updating the embla-carousel** versions in all the package.json's of all the packages in this monorepo?
I might be missing something,
What do you use to automate updating the embla-carousel** versions in all the package.json's of all the packages in this monorepo?
@zaaakher good question! These commands in the root package.json
will do that:
Best, David
@davidjerleke so it seems that the unrecognized embla-carousel
in CodeSandbox is not resolved yet.
The only way I was able to fix it is by making embla-carousel
a dependency in createSandboxReactPackageJson.ts
like this:
dependencies: {
react: dependencies.react,
'react-dom': dependencies['react-dom'],
'react-scripts': '4.0.0',
'embla-carousel-react': dependencies['embla-carousel-react'],
'embla-carousel': dependencies['embla-carousel'], <--- here (assuming embla-carousel moved back to dependencies)
...(plugins && plugins)
},
Does that mean I should move embla-carousel
back as a regular dependency in embla-carousel-docs
like before?
@davidjerleke so it seems that the unrecognized
embla-carousel
in CodeSandbox is not resolved yet.The only way I was able to fix it is by making
embla-carousel
a dependency increateSandboxReactPackageJson.ts
like this:dependencies: { react: dependencies.react, 'react-dom': dependencies['react-dom'], 'react-scripts': '4.0.0', 'embla-carousel-react': dependencies['embla-carousel-react'], 'embla-carousel': dependencies['embla-carousel'], <--- here (assuming embla-carousel moved back to dependencies) ...(plugins && plugins) },
Does that mean I should move
embla-carousel
back as a regular dependency inembla-carousel-docs
like before?
If I spin up a new npm
or yarn
project locally and import the types from embla-carousel
when using embla-carousel-react
, it just works. And with pnpm
installing it as a devDependency
works. Maybe CodeSandbox handles dependencies differently than all package managers?
So yes: If adding it as a dependency
works, we have to settle with this special solution for the CodeSandboxes only. Sorry for the back and forth. Didn't know CodeSandbox works that way. Thank you 👍!
Don't worry about it 👌
I just pushed a commit and everything works properly now 👍
Fixes #684
I had to add
embla-carousel
as a dependency ofembla-carousel-docs
so that it can be used increateSandboxReactPackageJson.ts
dynamically