Open jgw96 opened 7 years ago
Yep, but the param and return type jsdoc comments have been removed now. This would build fine for me. Ultimately I think the issue is with the jsdoc parser and not an issue with ionic.
If you need any additional information just let me know.
All the best, Carl
On Thu, Aug 10, 2017, 6:19 PM dwieeb notifications@github.com wrote:
Is the problem here? https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/core/plugin.ts#L240-L255
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-cli/issues/2628#issuecomment-321688929, or mute the thread https://github.com/notifications/unsubscribe-auth/ABssur3QOs__6xCl3flsxsZTw4HrajTFks5sW4HygaJpZM4OzuqB .
@lostdev, thanks! Changing jsDoc:
from
* @returns {function(...[any]): (undefined|*|Observable|*|*)}
to
* @returns {function([any]): (undefined|*|Observable|*|*)}
solved the problem
@dwieeb why did you close this issue?
@lostdev You said it was an issue with the JSDoc parser, right? Is there something actionable I can do to fix this?
Considering other people also have this issue, I think it would be a good idea investigate what the root cause of this is and make sure there is a proper fix moving forward.
My "fix" above is only a workaround and will not work in an environment that cannot be controlled (my fix is to edit the source of your node module). Refreshing my node packages will remove my "fix".
Just my thoughts!
I'll keep it open, but so far it looks like only a couple of people get this issue. I think it might be better as an issue of Ionic Native? https://github.com/ionic-team/ionic-native
Had the same issue. The root cause (for me) was due to changes in ionic-native. long time ago ( few months ) when I started on my current project, the ionic-native created a directory under node_modules. But with the new ( I guess ) changes, this directory shouldn't be exists, only node_modules/@ionic-native/.
I removed the node_modules/ionic-native, reinstalled the @ionic-native/core (and the rest of the native I'm using ) and the issue was resolved.
still has the same issue, don't have too much info to know what is really being wrong, so annoying!
@Batur24 Did you try @RoyeA's suggestion? Upgrading from ionic-native
to the new @ionic-native/<package>
packages seems to resolve the issue.
From @lostdev on August 9, 2017 18:1
Ionic version: (check one with "x") [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: When building my project using
ionic cordova build android --prod
I get the following error:Expected behavior: I expect the build to work, just like it does without the --prod flag.
Steps to reproduce: I cannot provide specific steps, but it started occurring after a recent update of the ionic CLI. After looking more in detail, the error is caused by a JSDoc comment in
node_modules\ionic-native\dist\esm\plugins\plugin.js
. The following are two versions of the JSDoc. The original (non-working), and my updated, which fixes the issue:Original code:
Fixed code (notice the ... missing)
Other information: My question on the Ionic forum: https://forum.ionicframework.com/t/error-ionic-native-dist-esm-plugins-plugin-js-module-build-failed-typeerror-cannot-read-property-type-of-undefined/101191/8 Another person with the same issue https://forum.ionicframework.com/t/error-during-executing-ionic-cordova-run-android-prod/100252/6 Seems to be an issue with the angular CLI? https://github.com/angular/angular-cli/issues/7110
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):tsconfig.json:
package.json:
npm outdated:
Copied from original issue: ionic-team/ionic#12628