ngx-permissions icon indicating copy to clipboard operation
ngx-permissions copied to clipboard

getInternalNameOfClass() called on a non-ES5

Open egorgrushin opened this issue 4 years ago • 1 comments

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]

egorgrushin avatar Aug 05 '20 13:08 egorgrushin

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"

python-vlad avatar Oct 29 '20 06:10 python-vlad