Closed stanislavromanov closed 4 years ago
in your package.json there will be script build:ssr script is not defined so you are getting unshift error try to run 'npm run build:ssr' you will get the same error.
in your package.json there will be script build:ssr script is not defined so you are getting unshift error
I don't have this script in package.json
. AFAIK the command ng add @ng-toolkit/universal
must create the script.
Same happening here, tried to create a project from scratch and add @ng-toolkit/universal
as stated by the docs but getting the same output error.
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.3
Node: 10.16.3
OS: win32 x64
Angular: 8.2.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.3
@angular-devkit/build-angular 0.803.3
@angular-devkit/build-optimizer 0.803.3
@angular-devkit/build-webpack 0.803.3
@angular-devkit/core 8.3.3
@angular-devkit/schematics 8.3.3
@angular/cli 8.3.3
@ngtools/webpack 8.3.3
@schematics/angular 8.3.3
@schematics/update 0.803.3
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
Fixed the error "cannot read property 'unshift' of undefined" while executing ng add @ng-toolkit/universal using the steps: Step 1:@ng-toolkit/universal, in package.json appears the new dependency, (might be with older version dependency but in 1.1.2 version "@ng-toolkit/universal": "1.1.21",) Step 2:Delete universal folder in the location node_modules\@ng-toolkit Step 3: Change the line in package.json to 7.1.2:: "@ng-toolkit/universal": "7.1.2", Step 4: now run the command ng add @ng-toolkit/universal@7.1.2
Closing it for housekeeping reason.
Please continue on #695.
its still there #716
Hi guys, I`m a little bit confused in regards with the .Net Core Web API side.
When I'm installing this package, and then i do a build --prod in order to get the files inside the wwwroot inside the .NET CORE web API project and then i press start, it doesnt do anything. What I
m missing from here? I guess somehow i would need to run the server like ng run server or something.
Who I would integrate this with .NET CORE Web API backend?
I'm submitting a...
In package
Current behavior
It does not work at all.
ng add @ng-toolkit/universal
is throwingERROR: Cannot read property 'unshift' of undefined
. No files are generated,package.json
is not changed etc.Expected behavior
It should work?
Minimal reproduction of the problem with instructions
ng new mycoolapp
cd mycoolapp
ng add @ng-toolkit/universal
Environment