0

I was trying to test EventCloud Multi-tenant Saas (.Net Core + Angular SPA) locally but it throws this error found in debug log file

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Users\myname\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\myname\Documents\Projects\EventCloudDemo\eventcloud\aspnet-core-angular\angular\node_modules\.bin;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\sbt\bin;JAVA_HOME\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\android-sdk\bin;C:\CustomLocationForGradle\gradle-4.3-rc-4\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Users\myname\AppData\Local\Microsoft\WindowsApps;JAVA_HOME\bin;C:\Users\myname\AppData\Local\Microsoft\WindowsApps;;C:\Users\myname\AppData\Local\Programs\Fiddler;C:\Users\myname\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: C:\Users\myname\Documents\Projects\EventCloudDemo\eventcloud\aspnet-core-angular\angular
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'ng serve --host 0.0.0.0 --port 4200' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `ng serve --host 0.0.0.0 --port 4200`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\myname\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\myname\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\myname\Documents\Projects\EventCloudDemo\eventcloud\aspnet-core-angular\angular
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.14.1
19 verbose npm  v6.5.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `ng serve --host 0.0.0.0 --port 4200`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I have updated both angular cli and typescript locally as I have installed Angular Cli globally but then it says

The serve command requires to be run in an Angular project, but a project definition could not be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `ng serve --host 0.0.0.0 --port 4200`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

While updating Angular Cli I followed this and this. Also, I did clone source project from here and followed this guideline. Remember server side core project runs successfully and I am able to see Swagger Api Index where all app endpoints are listed.

Simply Ged
  • 8,250
  • 11
  • 32
  • 40
Ishwor Khanal
  • 1,312
  • 18
  • 30

1 Answers1

0

I solved my problem from here .

Angular 6 looks for angular.json instead of angular-cli.json.

You need to update your @angular/cli.

I did update all the package with the following commands and updated all dependencies too. So as to remove all compatibility issues with other packages.

If you are starting your app or demo app, follow this procedure. Be extra careful if you are doing this for production app.

//to update your package.json

npm install -g npm-check-updates 

// use ncu to update your package // ncu for display //for re-writing your package.json

ncu -u

Update your @angular/cli to modify your application to be compatible with angular 6

ng update @angular/cli

npm install
npm start
Ishwor Khanal
  • 1,312
  • 18
  • 30