Angular Project
"name": "abp-zero-template",
"version": "10.0.0",
"abp-ng2-module": "^6.2.0",
"abp-web-resources": "^5.3.0",
Nebula Core version 10.0.0.
Abp (6.0.0)
I am getting below error when I run npm run publish command.
The error always appears at 92% when it is processing Terser.
ERROR in scripts.ef3fafcd5c3608cf8cf5.js from Terser
Invalid assignment [scripts.ef3fafcd5c3608cf8cf5.js:22301,33]
at ee (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:19541)
at c (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28244)
at ze (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:50572)
at qe (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:50653)
at T (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:34140)
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:30509
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28976
at N (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:38503)
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:30588
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28976
Full screenshot of the error is given below.
The Error log shows below detail.
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 'run',
1 verbose cli 'publish'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prepublish', 'publish', 'postpublish' ]
5 info lifecycle [email protected]~prepublish: [email protected]
6 info lifecycle [email protected]~publish: [email protected]
7 verbose lifecycle [email protected]~publish: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~publish: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\nodejs\;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Users\graphite.rack\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Azure Data Studio\bin;C:\Users\graphite.rack\.dotnet\tools;C:\Users\graphite.rack\AppData\Local\Yarn\bin;C:\Users\graphite.rack\AppData\Roaming\npm;
9 verbose lifecycle [email protected]~publish: CWD: C:\Users\graphite.rack\source\repos\NebulaAngular
10 silly lifecycle [email protected]~publish: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod'
10 silly lifecycle ]
11 silly lifecycle [email protected]~publish: Returned: code: 1 signal: null
12 info lifecycle [email protected]~publish: Failed to exec publish script
13 verbose stack Error: [email protected] publish: `gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod`
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:315: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:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\graphite.rack\source\repos\NebulaAngular
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "publish"
18 verbose node v14.16.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] publish: `gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod`
22 error Exit status 1
23 error Failed at the [email protected] publish script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
My Package.json file is shown below.
{
"name": "abp-zero-template",
"version": "10.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"ng-high-memory": "node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng",
"publish": "gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod",
"start": "gulp buildDev && ng serve --host 0.0.0.0 --port 4201",
"hmr": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --port 4201 --hmr",
"test": "gulp buildDev && ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "gulp buildDev && protractor",
"create-dynamic-bundles": "gulp buildDev",
"nswag": "cd nswag/ && refresh.bat"
},
"private": false,
"dependencies": {
"@angular/animations": "^10.0.2",
"@angular/cdk": "^10.0.1",
"@angular/common": "^10.0.2",
"@angular/compiler": "^10.0.2",
"@angular/core": "^10.0.2",
"@angular/elements": "^11.0.3",
"@angular/forms": "^10.0.2",
"@angular/localize": "^11.0.3",
"@angular/platform-browser": "^10.0.2",
"@angular/platform-browser-dynamic": "^10.0.2",
"@angular/platform-server": "^10.0.2",
"@angular/router": "^10.0.2",
"@formio/angular": "5.2.3-rc.1",
"@fullcalendar/core": "^5.1.0",
"@microsoft/signalr": "^3.1.3",
"@progress/kendo-angular-buttons": "6.1.0",
"@progress/kendo-angular-charts": "^5.1.0",
"@progress/kendo-angular-common": "2.0.0",
"@progress/kendo-angular-dateinputs": "5.1.0",
"@progress/kendo-angular-dialog": "^5.0.0",
"@progress/kendo-angular-dropdowns": "5.1.0",
"@progress/kendo-angular-excel-export": "4.0.0",
"@progress/kendo-angular-grid": "5.0.1",
"@progress/kendo-angular-icons": "^0.4.3",
"@progress/kendo-angular-inputs": "7.1.0",
"@progress/kendo-angular-intl": "3.1.0",
"@progress/kendo-angular-l10n": "3.0.0",
"@progress/kendo-angular-label": "^3.0.0",
"@progress/kendo-angular-layout": "^6.1.5",
"@progress/kendo-angular-navigation": "^1.1.0",
"@progress/kendo-angular-pdf-export": "3.0.0",
"@progress/kendo-angular-popup": "4.0.0",
"@progress/kendo-angular-progressbar": "^2.0.1",
"@progress/kendo-angular-scheduler": "^2.1.1",
"@progress/kendo-angular-treeview": "^5.1.0",
"@progress/kendo-data-query": "1.5.4",
"@progress/kendo-date-math": "^1.5.3",
"@progress/kendo-drawing": "1.13.7",
"@progress/kendo-licensing": "^1.1.3",
"@progress/kendo-recurrence": "^1.0.1",
"@progress/kendo-svg-icons": "^0.1.2",
"@progress/kendo-theme-default": "4.32.0",
"@swimlane/ngx-charts": "^16.0.0",
"abp-ng2-module": "^6.2.0",
"abp-web-resources": "^5.3.0",
"adal-angular": "^1.0.17",
"add": "^2.0.6",
"angular-gridster2": "^10.0.1",
"angular-http-deserializer": "^1.0.13",
"angular-oauth2-oidc": "^10.0.2",
"angular2-counto": "^1.2.5",
"angular2-text-mask": "^9.0.0",
"animate.css": "^4.1.0",
"chart.js": "^2.9.3",
"cookieconsent": "^3.1.1",
"core-js": "^3.6.4",
"famfamfam-flags": "^1.0.0",
"flatpickr": "^4.6.9",
"formiojs": "4.15.0-rc.13",
"js-cookie": "^2.2.1",
"just-compare": "^1.3.0",
"localforage": "^1.7.3",
"lodash-es": "^4.17.0",
"luxon": "^1.25.0",
"msal": "^1.2.2",
"ng2-file-upload": "^1.4.0",
"ngx-bootstrap": "^5.6.1",
"ngx-captcha": "^8.0.1",
"ngx-doc-viewer2": "^1.5.3",
"ngx-image-cropper": "^3.1.4",
"ngx-perfect-scrollbar": "^9.0.0",
"ngx-spinner": "^9.0.1",
"object-path": "^0.11.4",
"primeicons": "^4.0.0",
"primeng": "^9.1.2",
"push.js": "^1.0.12",
"quill": "^1.3.7",
"rtl-detect": "^1.0.2",
"rxjs": "^6.5.4",
"simple-line-icons": "^2.4.1",
"splitter": "^0.1.2",
"sweetalert2": "^9.10.7",
"text-mask-addons": "^3.8.0",
"tslib": "^2.0.0",
"webdriver-manager": "^12.1.7",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "^10.0.0",
"@angular/compiler-cli": "^10.0.2",
"@angularclass/hmr": "^2.1.3",
"@angularclass/hmr-loader": "^3.0.4",
"@types/jasmine": "~3.5.10",
"@types/jasminewd2": "^2.0.8",
"@types/lodash-es": "^4.17.0",
"@types/luxon": "^1.25.0",
"@types/node": "^14.0.14",
"codelyzer": "^6.0.0",
"globby": "^11.0.1",
"gulp": "^4.0.1",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-less": "^4.0.1",
"gulp-postcss": "^8.0.0",
"gulp-uglify": "^3.0.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"merge-stream": "^2.0.0",
"nswag": "^13.7.4",
"postcss-url": "^9.0.0",
"prettier": "2.1.2",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "3.9.6"
},
"config": {
"max_old_space_size": 40240
}
}
I have tried below changes but of no use.
"angularCompilerOptions": {
**"fullTemplateTypeCheck": false,**
**"strictTemplates": false,**
"strictInputTypes": false,
"strictAttributeTypes": false,
"strictOutputEventTypes": false,
"strictDomEventTypes": false,
"strictLiteralTypes": false,
"strictInjectionParameters": false
}
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
npm run publish
npm run ng-high-memory --build --prod
Can someone please help, it is preventing us publish the app?
Thank you
Hi @musa.demir,
I have checked and there is only class. Same class is not defined in different namespaces.
I have sent a new email. Could you do a remote session as that would help check issues quickly?
Thanks
Hi,
Is there any update?
Thanks
Hi @musa.demir, Is there any update?
I deleted service-proxies.ts, and recreated it with the command you mentioned, however toJson function was not created. If you want you can do a remote session to find the reason why nswag is not creating toJson method. This has happened on some other classess as well but not all.
Thanks
@musa.demir I have emailed the related code, now.
Hi, Is there any update?
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I am receiving toJson function. I have emailed the code regarding this issue, please have a look.
I am using kendo grid in my project. I have added custom styles such as colours into styles.css file and it is working fine, so no matter what theme I select the colour will remain as I defined them in styles.css. I want to use different colours for my grid based on the selection of theme. For example, if user selects default theme then I want to set colours of the grid to blue, if they select themeX then I want to change the colours of the grid to green. I don't want to create new theme, just customising the colour of the grid based on theme.
The current file 'styles.css' is global so colours defined here are applicable to every theme. Can you please proivde step by step instructions for doing the above?
Thanks
Hi,
The menu is loaded fine as per my previous comment, however, sometimes I need to progammatically refresh menu so that it gets the latest data from the server. What is the best way to refresh the menu?
I tried to use events for this purpose but when event is triggered, my global function inside side-bar-menu.component.ts
is not available inside the trigged code so I can't simply use the code below.
loadMyMenu(myParameterForMenuSelection: number): void {
//Code here for getting the menu from the server.
}
reloadMenu(): void {
abp.event.on('myParameterForMenuSelectionChanged', function (myParameterForMenuSelection) {
console.log("EVENT IS FIRED");
console.log(myParameterForMenuSelection);
this.loadMyMenu(myParameterForMenuSelection);//I get error here that loadMyMenu is not a function
});
}
I receive the below error when event is fired.
ERROR TypeError: this.loadMyMenu is not a function
What is the best way to refresh the menu?
I have fixed this issue, thanks to @musa.demir for asking me to use *ngIf
. I am showing my implementation below so that it may help someone else if they get stuck.
In side-bar-menu.component.html
add *ngIf="menu"
, note capital I of If.
<!-- BEGIN: Aside Menu -->
<div [class]="'aside-menu-wrapper aside-menu-' + currentTheme.baseSettings.menu.asideSkin" id="kt_aside_menu_wrapper" *ngIf="menu">
<div #asideMenu ktMenu [options]="menuOptions" [perfectScrollbar]="{wheelPropagation: false}"
[ngStyle]="{'max-height': '90vh', 'position': 'relative'}" id="kt_aside_menu" class="aside-menu scroll"
[attr.data-menu-vertical]="1" [attr.data-menu-scroll]="ui.getIsMenuScrollable() ? 1 : 0"
[attr.data-menu-dropdown]="ui.isSubmenuToggleDropdown() ? 1 : 0" (mouseenter)="mouseEnter($event)"
(mouseleave)="mouseLeave($event)" [class]="ui.getLeftAsideClass()">
<ul class="menu-nav">
<li class="menu-item mb-5" aria-haspopup="true"
data-ktmenu-submenu-toggle="hover" *ngIf="currentTheme.baseSettings.menu.searchActive">
<menu-search-bar></menu-search-bar>
</li>
<ng-container [ngTemplateOutlet]="menuListTemplate"></ng-container>
</ul>
</div>
</div>
<!-- END: Aside Menu -->
Replaced this.menu = this._appNavigationService.getMenu();
in ngOnInit()
of side-bar-menu.component.ts
with the code shown below. Replace your service and method names. Also, don't forget to inject your service in the constructor of side-bar-menu.component.ts
this._myMenuService.getAllGrantedMenus(1, 1, 2)
.subscribe(result => {
console.log(result);
this.menu = result;
});