-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ERROR] An error occurred while running subprocess ng. #2
Comments
(alias) ViewChild(selector: string | Function | Type<any>, opts: {
read?: any;
static: boolean;
}): any
import ViewChild
Expected 2 arguments, but got 1.ts(2554)
core.d.ts(8436, 47): An argument for 'opts' was not provided. Expected 2 arguments, but got 1.ts(2554) export declare const ViewChild: ViewChildDecorator;
/**
* Type of the ViewChild decorator / constructor function.
*
* @see `ViewChild`.
* @publicApi
*/
export declare interface ViewChildDecorator {
/**
* @description
* Property decorator that configures a view query.
* The change detector looks for the first element or the directive matching the selector
* in the view DOM. If the view DOM changes, and a new child matches the selector,
* the property is updated.
*
* View queries are set before the `ngAfterViewInit` callback is called.
*
* **Metadata Properties**:
*
* * **selector** - The directive type or the name used for querying.
* * **read** - True to read a different token from the queried elements.
* * **static** - True to resolve query results before change detection runs
*
* When `static` is not provided, uses query results to determine the timing of query
* resolution. If any query results are inside a nested view (such as `*ngIf`), the query is
* resolved after change detection runs. Otherwise, it is resolved before change detection
* runs.
*
* The following selectors are supported.
* * Any class with the `@Component` or `@Directive` decorator
* * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
* with `@ViewChild('cmp')`)
* * Any provider defined in the child component tree of the current component (e.g.
* `@ViewChild(SomeService) someService: SomeService`)
* * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
* any`)
* * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
* template;`)
*
* @usageNotes
*
* {@example core/di/ts/viewChild/view_child_example.ts region='Component'
* linenums="false"}
*
* ### Example 2
*
* {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'
* linenums="false"}
*
* @Annotation
*/
(selector: Type<any> | Function | string, opts: {
read?: any;
static: boolean;
}): any;
new (selector: Type<any> | Function | string, opts: {
read?: any;
static: boolean;
}): ViewChild;
} |
|
npm cordova run browser --verboseionic:lib Terminal info: { ci: false, shell: 'C:\\WINDOWS\\system32\\cmd.exe', tty: true, windows: true } +0ms
ionic:lib CLI global options: { _: [ 'cordova', 'run', 'browser' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, project: null, '--': [] } +5ms
ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
ionic:lib:project Project details: { configPath: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp\\ionic.config.json', errors: [], context: 'app', type: 'angular' } +1ms
ionic Context: { binPath: 'C:\\Users\\cleilsonpereira\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\cleilsonpereira\\AppData\\Roaming\\npm\\node_modules\\ionic', execPath: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp', version: '5.2.6' } +0ms
√ Creating .\www directory for you - done!
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp\\config.xml', package.json: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp\\package.json') +0ms
[WARN] browser is not supported by native-run. Using Cordova to run the app.
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp\\config.xml', package.json: 'C:\\Users\\cleilsonpereira\\Documents\\Workspace\\Ionic\\ionicUberApp\\package.json') +68ms
ionic:lib:telemetry Sending telemetry for command: 'ionic cordova run' [ 'browser', '--verbose', '--interactive', '--color' ] +0ms
ionic:lib:build build options: { '--': [],
ionic:lib:build engine: 'cordova',
ionic:lib:build platform: 'browser',
ionic:lib:build project: undefined,
ionic:lib:build verbose: false,
ionic:lib:build configuration: undefined,
ionic:lib:build sourcemaps: undefined,
ionic:lib:build cordovaAssets: true,
ionic:lib:build type: 'angular' } +0ms
ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:lib:build Looking for ionic:build npm script. +8ms
> ng.cmd run app:ionic-cordova-build --platform=browser
ng:analytics getGlobalAnalytics +0ms
ng:analytics Client Analytics config found: false +63ms
ng:analytics Analytics disabled. Ignoring all analytics. +1ms
ng:analytics getSharedAnalytics +1ms
chunk {cordova} cordova.js, cordova.js.map (cordova) 50.6 kB [entry] [rendered]
chunk {main} main-es2015.js, main-es2015.js.map (main) 661 bytes [initial] [rendered]
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 149 kB [initial] [rendered]
chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 6.09 kB [entry] [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 108 kB [initial] [rendered]
Date: 2019-09-18T16:10:14.862Z - Hash: b66a3c5fe1c10077469b - Time: 11962ms
ERROR in src/app/home/home.page.ts:11:4 - error TS2554: Expected 2 arguments, but got 1.
11 @ViewChild('map') mapElement: any;
~~~~~~~~~~~~~~~~
node_modules/@angular/core/core.d.ts:8436:47
8436 (selector: Type<any> | Function | string, opts: {
~~~~~~~
8437 read?: any;
~~~~~~~~~~~~~~~~~~~
8438 static: boolean;
~~~~~~~~~~~~~~~~~~~~~~~~
8439 }): any;
~~~~~
An argument for 'opts' was not provided.
[ERROR] An error occurred while running subprocess ng.
ng.cmd run app:ionic-cordova-build --platform=browser exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 1 functions +1ms
ionic:utils-process error while killing process tree for 7120: { Error: Command failed: taskkill /pid 7120 /T /F
ionic:utils-process ERRO: o processo "7120" n�o foi encontrado.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:289:12)
ionic:utils-process at ChildProcess.emit (events.js:182:13)
ionic:utils-process at maybeClose (internal/child_process.js:962:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 7120 /T /F' } +232ms
ionic:utils-process onBeforeExit handler: error from function: { Error: Command failed: taskkill /pid 7120 /T /F
ionic:utils-process ERRO: o processo "7120" n�o foi encontrado.
ionic:utils-process
ionic:utils-process at ChildProcess.exithandler (child_process.js:289:12)
ionic:utils-process at ChildProcess.emit (events.js:182:13)
ionic:utils-process at maybeClose (internal/child_process.js:962:16)
ionic:utils-process at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
ionic:utils-process killed: false,
ionic:utils-process code: 128,
ionic:utils-process signal: null,
ionic:utils-process cmd: 'taskkill /pid 7120 /T /F' } +2ms
ionic:utils-process processExit: exiting (exit code: 1) +136ms |
in v8 ViewChild syntax changed CHANGELOG says
And I advice to use https://github.com/angular/angular/blob/master/CHANGELOG.md to update In case of "lot ts errors", I guess you have Have you SFC ? Is your template inside your .ts file ? If yes I doupt you use some pipe without specify all parameters ? If it is the case you can make parameters of pipe as optional like
Otherwise you can have some hostlistener with no needed second param which was working without
It should be
|
https://github.com/angular/angular/blob/master/CHANGELOG.md BREAKING CHANGES
|
Static Query Migration GuideBefore:
After:
|
The text was updated successfully, but these errors were encountered: