Hello,
We are getting the following Gulp error after giving the "npm start" command while running the angular project. version : 8.6 .NET Core + Angular
So far we have tries unstalling and reinstalling Gulp, deleting the node modules etc. But still the error persists.
Need urgent help with this please ....
This is the screenshot of error :
And here are the logs :
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
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:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\username\source\repos\Elevate.Broker\src\ElevateBroker.Web.Host\node_modules\.bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\LINQPad6;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\UserName\AppData\Local\Microsoft\WindowsApps;C:\Users\UserName\.dotnet\tools;C:\Users\UserName\AppData\Roaming\npm;C:\Users\UserName\AppData\Local\GitHubDesktop\bin
9 verbose lifecycle [email protected]~start: CWD: C:\Users\ UserName \source\repos\Elevate.Broker\src\ElevateBroker.Web.Host
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'gulp buildDev && 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: `gulp buildDev && ng serve --host 0.0.0.0 --port 4200`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1026:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\ UserName \source\repos\Elevate.Broker\src\ElevateBroker.Web.Host
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v13.9.0
19 verbose npm v6.13.7
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `gulp buildDev && 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 ]
Could you please also include our customers in the email theread please as per their request so that they get the emails as well ?
Faheem - [email protected]
Matan - [email protected]
Thnak you.
13 Answer(s)
-
0
Hi @omkarchoudhari It might be something with your
bundle.json
. Did you check it? -
1
Hey @omkarchoudhari and @demirmusa
No this is a big problem that will need to be solved.
The workaround is to d change your package.json from @angular-devkit/build-angular": "~0.901.0", to "@angular-devkit/build-angular": "0.901.6",
For me the ~ caused an upgrade to 0.901.9 which has dependencies way down the list which ultimately upgraded globby.
The upgrade to globby ultimately then changes the behaviour of this line in the gulpfile.js and change the way the styleEntries array looks, which causes the error you see above.
styleEntries[styleBundle.output] = globby.sync(processInputDefinition(styleBundle.input), { noext: true });
So long story short to fix this for now. Delete your yarn.lock change the package.json to FIX the version to 0.901.6 and then run yarn again to install (I had deleted ALL node_modules as well).
And I'm back up and running.
-
0
Thanks a lot @rickfrankel :)
-
0
@rickfrankel I updated to Angular 10 thus I cannot use "@angular-devkit/build-angular": "0.901.6". What needs to be changed to make it work?
Thanks in advance
-
0
Hi @antonis
You can update your gulp file to latest version in AspNet Zero.
-
0
Hi, we have same issue - running 8.4 .NET Core + Angular.
Would an upgrade to 9.3 .NET Core + Angular fix this error??
-
0
I was in @olmy90 situation. I have @angular-devkit/build-angular": "~0.1000.0 so I could not use the older versiona as well. Yarn woud not run as it was giving a error that package-lock.json was stopping yarn from running. I deleted BOTH package-lock.json and yarn.lock then ran yarn once again. This put gulp back in place and I was up and running. I hope this helps.
-
0
Hi @olmy90
For your version, yes that can work.
Hi @KarakTheWise
In your case, it should be related to folder you are placing your solution. Could you check if the full path of your Angular solution contains spaces of special characters like ( or ) etc... ?
-
0
Hi @ismcagdas,
Actually, yes, the full path does: D:) > App Development > Resolution > ASPNET-Zero > then the various folders for angular, .github, aspnet-core. The hyphen in the 'aspnet-core' directory wouldn't affect that I wouln't think But mayb the hyphen in the 'ASPNET-Zero' directory would? Is that what you're thinking?
On a side note, the only time I've had odd issues like was installing the dependencies for the PrimeNG fullcaldendar from @fullcalendar.
-
0
Hi @KarakTheWise
Dash character shouldn't be a problem here. Is it possible to share your Angular project via email with [email protected] ? In that way, we can identify tje problem faster.
-
0
removing "globby" from package.json file solved my issue. I am upgrading to the latest version of aspnetzero template using angular 10 btw.
-
0
Hi @enerjisauretim
Globby is used here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/gulpfile.js#L4. Could you try removing yoru node_modules folder, install packages again and see if it still works ?
Thanks,
-
0
Hi @ismcagdas, I am getting the same issue on my machine , but not on my colleague machine for same project. My node and gulp versions are below,
F:\GrowthPlan\GrowthPlan_ANZ8.9\GrowthPlan_ANZ8.9\angular>node -v v14.15.4
F:\GrowthPlan\GrowthPlan_ANZ8.9\GrowthPlan_ANZ8.9\angular>gulp -v CLI version: 2.3.0 Local version: 4.0.2
and in my package.json : "@angular-devkit/build-angular": "^0.901.12"
could you please help me with proper steps, what should I need to do.