[Error]: Supplied parameters do not match any signature of call target. & at Pipe._onclose
Hi, First sorry for my English.
I need your help. Please look at my code is: https://github.com/rwalus/ionic2-app I create a simple pipe that changes the string of characters to lowercase.
I run the app command:
$ ionic run ios
or
$ ionic emuate ios
I get an error:
ngc: Error: Error at /Users/rav/developer/mobile/ionic2-app/.tmp/pages/dashboard/dashboard.ngfactory.ts:328:86: Supplied parameters do not match any signature of call target.
at check (/Users/rav/developer/mobile/ionic2-app/node_modules/@angular/tsc-wrapped/src/tsc.js:31:15)
at Tsc.typeCheck (/Users/rav/developer/mobile/ionic2-app/node_modules/@angular/tsc-wrapped/src/tsc.js:86:9)
at /Users/rav/developer/mobile/ionic2-app/node_modules/@angular/tsc-wrapped/src/main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Function.Module.runMain (module.js:449:11)
at startup (node.js:148:18)
at node.js:405:3
[20:54:28] ngc: Compilation failed
[20:54:28] ngc failed: NGC encountered an error
[20:54:28] Error: NGC encountered an error
at ChildProcess.<anonymous> (/Users/rav/developer/mobile/ionic2-app/node_modules/@ionic/app-scripts/dist/ngc.js:62:24)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:484:12)
Error running ionic app script "build": Error: NGC encountered an error
npm
ERR!
Darwin 16.0.0
npm
ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node
v5.12.0
npm
ERR! npm v3.8.6
npm ERR!
code ELIFECYCLE
npm ERR! ionic2-app@ build: `ionic-app-scripts build`
npm
ERR! Exit status 1
npm ERR!
npm ERR!
Failed at the ionic2-app@ build script 'ionic-app-scripts build'.
npm
ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR!
If you do, this is most likely a problem with the ionic2-app package,
npm ERR!
not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic2-app
npm ERR!
Or if that isn't available, you can get their info via:
npm
ERR! npm owner ls ionic2-app
npm
ERR!
There is likely additional logging output above.
npm ERR!
Please include the following file with any support request:
npm ERR! /Users/rav/developer/mobile/ionic2-app/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Logfile: /Users/rav/developer/mobile/ionic2-app/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle ionic2-app@~prebuild: ionic2-app@
6 silly lifecycle ionic2-app@~prebuild: no script for prebuild, continuing
7 info lifecycle ionic2-app@~build: ionic2-app@
8 verbose lifecycle ionic2-app@~build: unsafe-perm in lifecycle true
9 verbose lifecycle ionic2-app@~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/rav/developer/mobile/ionic2-app/node_modules/.bin:/usr/local/bin:/Users/rav/.rvm/gems/ruby-2.3.0/bin:/Users/rav/.rvm/gems/ruby-2.3.0@global/bin:/Users/rav/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/pgsql/bin:/Users/rav/.rvm/bin:/Users/rav/bin/
10 verbose lifecycle ionic2-app@~build: CWD: /Users/rav/developer/mobile/ionic2-app
11 silly lifecycle ionic2-app@~build: Args: [ '-c', 'ionic-app-scripts build' ]
12 silly lifecycle ionic2-app@~build: Returned: code: 1 signal: null
13 info lifecycle ionic2-app@~build: Failed to exec build script
14 verbose stack Error: ionic2-app@ build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid ionic2-app@
16 verbose cwd /Users/rav/developer/mobile/ionic2-app
17 error Darwin 16.0.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
19 error node v5.12.0
20 error npm v3.8.6
21 error code ELIFECYCLE
22 error ionic2-app@ build: `ionic-app-scripts build`
22 error Exit status 1
23 error Failed at the ionic2-app@ build script 'ionic-app-scripts build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ionic2-app package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ionic-app-scripts build
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ionic2-app
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ionic2-app
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
My current version packages:
node: 5.12.0
npm: 3.8.6
ionic : 2.1.0
os: darwin x64
angular-cli: 1.0.0-beta.16
Please help solve the patient bug ... Thanks for the help.
hey @rwalus ,
I had the same issue with ionic2 rc.0 today and I somehow managed to get it working 😄 .
So the issue I found was that, when we use the generator to create a pipe (I believe you also used the generator or got the code from example.) , your method signature looks like this
transform(value, args).
this means, the method expects 2 parameters. However when you call pipe via
{{ name | lowercase }}, you essentially pass only one parameter (name) and hence the error happens.
Change your pipe code to
transform(value) and it should work (to have only one parameter).
It worked for me. Hope this helps
cheers
Sam
Thanks so much @sameera207! For anyone interested:
If you're using ionic 2 up from rc0 and use ng2-translate and get a lot of "Supplied parameters do not match any signature of call target." at ngfactories the solution is to replace
{{ 'text' | translate }}
with
{{ 'text' | translate:{value: null} }}
for the time being.
@sameera207 thx so much!
transform(value, args)
this means, the method expects 2 parameters. However when you call pipe via
omg.. it's true! I think the second parametr used by the generator should be optional :)
Same issue here.
This issue was moved to driftyco/ionic-app-scripts#255
if somewhere in your code you are calling a function without using the parameters you listed for it, the error will be come out too.