fcl-js
fcl-js copied to clipboard
[BUG] Errors with Nuxt 2 application after updating @onflow/fcl from 1.3.2 to 1.4.0
trafficstars
Current Behavior
Following errors are shown and application is not working:
ERROR in ./node_modules/@onflow/types/dist/types.module.js 303:39
Module parse failed: Unexpected token (303:39)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| return Object.entries(contracts).reduce((c, _ref) => {
| let [key, value] = _ref;
> const networkContractAlias = value?.aliases?.[network];
| if (networkContractAlias) {
| c[key] = networkContractAlias;
ERROR in ./node_modules/@onflow/fcl/dist/fcl.module.js 87:34
Module parse failed: Unexpected token (87:34)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function watchForChainIdChanges() {
| return config.subscribe(function configSubscriber(config) {
> const nextAccessNode = config?.["accessNode.api"];
| if (this.prevAccessNode !== nextAccessNode) {
| setChainIdDefault();
Expected Behavior
No errors are shown and application is working.
Steps To Reproduce
- Working Nuxt 2 application using:
- "nuxt": "^2.16.1"
- "vue": "^2.7.14"
- "webpack": "^4.46.0"
- "@onflow/fcl": "^1.3.2"
- "@onflow/types": "^1.0.5"
- Update to following:
- "@onflow/fcl": "^1.4.0"
- "@onflow/types": "^1.1.0"
- Run the application and errors should appear
npm run dev
Environment
- OS: Microsoft Windows 10 Enterprise (10.0.19045)
- Node: 18.4.0
- npm: 9.6.4
What are you currently working on that this is blocking?
No response