ngx-permissions
ngx-permissions copied to clipboard
getInternalNameOfClass() called on a non-ES5
angular: 9.0.5 ngx-permissions: 8.0.0 tsconfig.target: es5
It throws next error on build:
WARNING in Invalid constructor parameter decorator in /home/user/workspace/epm-idev/epm-idev-dpv4-gitlab-pull-requests@2/app/node_modules/ngx-permissions/fesm2015/ngx-permissions.js: () => []
ERROR in getInternalNameOfClass() called on a non-ES5 class: expected NgxPermissionsConfigurationStore to have an inner class declaration
Btw, it is ok with [email protected]
Error: Error on worker #1: Error: getInternalNameOfClass() called on a non-ES5 class: expected NgxPermissionsConfigurationStore to have an inner class declaration
I got the same error while building the project.
UPD:
I was helped by building the project under ES2015 and then returning back to ES5. It all worked.
tsconfig.json
-> compilerOptions
-> "target": "ES5"
change to "target": "ES2015"
. Build your project. After change "target": "ES2015"
change to "target": "ES5"