question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic Failing Build Process

See original GitHub issue

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

A bug: please describe the error that you encountered

I’m trying to build a monorepo with reusable Ionic components. When trying to package a sample app with nothing but a blank Ionic starter and ng-packagr, I get the following error during npm run packagr:

BUILD ERROR
node_modules/ionic-angular/components/picker/picker-component.d.ts.PickerCmp.html(13,71): : Expected 0 arguments, but got 1.
node_modules/ionic-angular/components/input/input.d.ts.TextInput.html(1,928): : Expected 0 arguments, but got 1.
node_modules/ionic-angular/components/input/input.d.ts.TextInput.html(1,961): : Expected 0 arguments, but got 1.

Error: node_modules/ionic-angular/components/picker/picker-component.d.ts.PickerCmp.html(13,71): : Expected 0 arguments, but got 1.
node_modules/ionic-angular/components/input/input.d.ts.TextInput.html(1,928): : Expected 0 arguments, but got 1.
node_modules/ionic-angular/components/input/input.d.ts.TextInput.html(1,961): : Expected 0 arguments, but got 1.

How To Reproduce

  1. Create a blank Ionic starter project: ionic start ionic-packagr-test blank.
  2. Import needed libraries (see below).
  3. Setup public_api.ts (see below).
  4. Run npm run packagr.

package.json:

{
  "name": "ionic-packagr-test",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve",
    "packagr": "ng-packagr -p ng-package.json"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "4.9.1",
    "@ionic-native/splash-screen": "4.9.1",
    "@ionic-native/status-bar": "4.9.1",
    "@ionic/storage": "^2.1.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "^5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.6.8",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "^5.2.11",
    "@angular/language-service": "^6.0.7",
    "@ionic/app-scripts": "3.1.10",
    "@types/node": "^10.5.2",
    "ng-packagr": "^3.0.3",
    "ts-node": "^7.0.0",
    "tslint": "^5.10.0",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project"
}

public_api.ts:

export * from './src/app/app.module';

Expected Behaviour

Just to build, I suppose.

Version Information

See above.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sreerajkarippalacommented, Dec 4, 2019

In the case of ionic 4, check your code using ionic-angular then replace with @ionic/angular

0reactions
github-actions[bot]commented, Jun 19, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic iOS build process failing
Hi Everyone So I'm attempting to build out my test Ionic 5.4.15 app to iOS and I'm having a hell of a time...
Read more >
Why does my previously successful build from (some time ago ...
A common request about Ionic Appflow builds involves failures related to a build that was previously successful. For example:.
Read more >
Ionic build process is not terminated - Stack Overflow
In case someone has the same problem, just noticed that after a few minutes after running ionic cordova build ios it ends after...
Read more >
Ionic Cordova build Android failed, unable to start the daemon ...
Ionic Cordova build Android failed, unable to start the daemon process issue fixed. 4.8K views 2 years ago INDORE · Break the laws....
Read more >
iOS Build Failed issue with Ionic … | Apple Developer Forums
iOS Build Failed issue with Ionic 6 & Xcode 13 ... Hi Everybody, Need help with the following errors when building IOS app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found