Run bun run dev:prepare$ nuxt-module-build build --stub && nuxi prepare playgroundError: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;import { convertCompilerOptionsFromJson } from 'typescript';^SyntaxError: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;..Error: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;error: script "dev:prepare" exited with code 1
Run bun run dev:prepare$ nuxt-module-build build --stub && nuxi prepare playgroundError: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;import { convertCompilerOptionsFromJson } from 'typescript';^SyntaxError: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;..Error: Named export 'convertCompilerOptionsFromJson' not found. The requested module 'typescript' is a CommonJS module, which may not support all module.exports as named exports.CommonJS modules can always be imported via the default export, for example using:import pkg from 'typescript';const { convertCompilerOptionsFromJson } = pkg;error: script "dev:prepare" exited with code 1
It was working fine. After the error occurred, I tried adding "moduleResolution": "bundler" to tsconfig.json, but it's still not working. What should I check?
Similar Threads
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community