-
-
Notifications
You must be signed in to change notification settings - Fork 40
iOS delegate implementation causes TypeError: Attempted to assign to readonly property. #70
Comments
Ok so if I comment out the code that resulted in the above code from
|
Ok found that the consistent thing between these two files is that they both have delegates. Commenting out the delegates in the files results in it working. Delegate code:
Bundle delegate code:
|
@bnussey could you post a sample project on GitHub, so I can reproduce the error? |
Hey @hdeshev all you need to do is add a delegate like I have above and bundle and then try and run. I used this as a reference - https://docs.nativescript.org/runtimes/ios/how-to/ObjC-Subclassing.html#typescript-delegate-example |
I have two different delegates and they both cause the error |
If you'd like to replicate this on your side, use the following code:
|
This is caused by the emitting of the helpers.
Add a |
This has fixed it, thank you @NathanaelA |
I am seeing the exact same issue that @bnussey was seeing with the
The code in the Object.defineProperty(exports, "__esModule", { value: true });
var base_1 = __webpack_require__(/*! ./base */ 582);
exports.environment = __assign({}, base_1.baseConfig); |
Hi @slmolloy did you do it in your |
My |
@slmolloy any luck on this ? having the same issue and i'm getting crazy with tsconfigs |
@danielgek One of my teammates figured it out. We did not use the In the second link at the end of the post, there is info on the crashing on startup. We used the
We then updated our
And added
|
Note to future readers: we had the same issue a while back and @slmolloy 's comment above did fix the issue. The issue reappeared by itself after we migrated to Webpack 4 / nativescript-dev-webpack 0.15.1 For some strange reason, the .js file that implements the eliminate-extends was automatically deleted from the file system after the webpack.config.js was updated. Not sure if this is by design, but maybe the webpack config update script does this. After manual recreation of the .js file and adjustment of the webpack.config.js it works again. IMHO the root issue (iOS delegate implementation causes TypeError) is still a bug. |
@lambourn can you please elaborate on how you implement @slmolloy 's solution? i've created the
but al iget is that it can't resolve the file: |
@miguelopezv sure. In my case, the In the
to ensure it gets found. Then in the
|
fyi - this issue still exists with {N} 5.2 and nativescript-dev-webpack 0.20.2 |
After running
npm run start-ios-bundle
I get the following:This error relates to this code which is from my project, not a plugin:
I've tried adding
"noImplicitUseStrict": true,
to my tsconfig, but no success.I am using the standard webpack.common.js exactly like
nativescript-sdk-examples-ng
and here is my tsconfig:The text was updated successfully, but these errors were encountered: