Open purple-force opened 3 weeks ago
exports.require need to be added in package.json
i got the same issue
i got the same issue when using ant-design-pro
i got the same issue when using ant-design-pro
You can revert the dependencies to the previously stable version (e.g., 1.0.8) as a temporary fix to start the project
i got the same issue when using ant-design-pro
i got the same issue when using ant-design-pro
temporarily add require
编译一直报错 过不去 应该怎么解决啊
same issue here
I don't think this is an error:
in webpack project, it can build successfully, showing no issues with the recommended usage of this package.
only having exports.import
means this package strictly allows Native ESM
imports only, and the following code runs correctly:
// test.js
import * as mod from 'click-to-react-component'
const run = async () => {
const mod2 = await import('click-to-react-component')
console.log('mod: ', mod)
// mod: [Module: null prototype] { ClickToComponent: [Function (anonymous)] }
console.log('mod2: ', mod2)
// mod2: [Module: null prototype] { ClickToComponent: [Function (anonymous)] }
}
run()
i got the same issue, how to fix?
i got the same issue, how to fix?
add resolutions
to package.json
// package.json
"resolutions": {
"click-to-react-component":"1.1.0"
}
same issue
添加 "click-to-react-component":"1.0.8" 就可以解决了
fix with below code add in package.json
"resolutions": {
"click-to-react-component": "1.0.8",
},
Same issue, any progress?
Describe the bug when
require.resolve('click-to-component')
, an error was thrown: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in xxxxx//ode_modules/click-to-react-component/package.jsonTo Reproduce Steps to reproduce the behavior:
Expected behavior No error.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.