In an electron app when inserting this line:
import i18next from 'i18next';
I get this error:
TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.<anonymous> (/home/marco/webMatters/electronMatters/IPFSbase/.webpack
/main/index.js:76805:16)
at Module../src/ipfs-on-path/index.js (/home/marco/webMatters/electronMatters/IPFSbase
/.webpack/main/index.js:76906:30)
devDependencies:
"electron": "^11.2.1",
"typescript": "^4.0.2",
dependencies:
"i18next": "^19.8.4",
"i18next-electron-language-detector": "^0.0.10",
"i18next-icu": "^1.4.2",
"i18next-node-fs-backend": "^2.1.3",
- node version: v14.5.0
- O.S. : Ubuntu 18.04.4.Desktop
How to solve the problem?
question from:
https://stackoverflow.com/questions/65890190/import-i18next-from-i18next-causes-cannot-assign-to-read-only-property-expor 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…