keystone
keystone copied to clipboard
Local assets example throws an error on image upload
When running the examples/assets-local with pnpm dev and try to upload an image I get:
An error occurred while resolving input fields.
- Post.banner: require() of ES Module /home/jneidel/tmp/keystone/node_modules/.pnpm/[email protected]/node_modules/file-type/index.js from /home/jneidel/tmp/keystone/packages/core/src/lib/assets/createImagesContext.ts not supported.
Instead change the require of index.js in /home/jneidel/tmp/keystone/packages/core/src/lib/assets/createImagesContext.ts to a dynamic import() which is available in all CommonJS modules.
node -v => v16.20.2