Describe the bug
The changes introducing InlineAutocomplete break previously working builds using Next.js due to the fact that it uses the ESM only module @koddsson/textarea-caret.
To Reproduce
Steps to reproduce the behavior:
- Setup a new next.js app
- Add @primer/react
- Use primer components
- See error
Expected behavior
Continued support for Next.js with no build errors. Possibly by inlining work provided by @koddsson/textarea-caret @primer/react.
Screenshots
Error: require()ofESModule C:\Projects\Git\@org\project\.yarn\cache\@koddsson-textarea-caret-npm-4.0.1-58e5d1bae2-7a44f96cdf.zip\node_modules\@koddsson\textarea-caret\index.jsfromC:\Projects\Git\@org\project\.yarn\__virtual__\@primer-react-virtual-c9b4fb8b62\0\cache\@primer-react-npm-35.6.0-0eb6ab2331-c71e61be84.zip\node_modules\@primer\react\lib\drafts\utils\character-coordinates.jsnotsupported.Insteadchangetherequireofindex.jsinC:\Projects\Git\@org\project\.yarn\__virtual__\@primer-react-virtual-c9b4fb8b62\0\cache\@primer-react-npm-35.6.0-0eb6ab2331-c71e61be84.zip\node_modules\@primer\react\lib\drafts\utils\character-coordinates.jstoadynamicimport()whichisavailableinallCommonJSmodules.atObject.require$$0.Module._extensions..js(C:\Projects\Git\@org\project\.pnp.cjs:19891:15)atModule.load(node:internal/modules/cjs/loader:981:32)atFunction.require$$0.Module._load(C:\Projects\Git\@org\project\.pnp.cjs:19735:14)atModule.require(node:internal/modules/cjs/loader:1005:19)atrequire(node:internal/modules/cjs/helpers:102:18)atObject.<anonymous>(C:\Projects\Git\@org\project\.yarn\__virtual__\@primer-react-virtual-c9b4fb8b62\0\cache\@primer-react-npm-35.6.0-0eb6ab2331-c71e61be84.zip\node_modules\@primer\react\lib\drafts\utils\character-coordinates.js:8:45)atModule._compile(node:internal/modules/cjs/loader:1105:14)atObject.Module._extensions..js(node:internal/modules/cjs/loader:1159:10)atObject.require$$0.Module._extensions..js(C:\Projects\Git\@org\project\.pnp.cjs:19895:33)atModule.load(node:internal/modules/cjs/loader:981:32){code: 'ERR_REQUIRE_ESM'}Desktop (please complete the following information):
- OS: All
- Browser: All
- Version: 35.6.0
Smartphone (please complete the following information):
- Device: All
- OS: All
- Browser: All
- Version: 35.6.0
Describe the bug
The changes introducing
InlineAutocompletebreak previously working builds using Next.js due to the fact that it uses the ESM only module @koddsson/textarea-caret.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Continued support for Next.js with no build errors. Possibly by inlining work provided by @koddsson/textarea-caret @primer/react.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):