Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error encountered resolving symbol values statically #937

Closed
antoineabourjeilycme opened this issue Jan 4, 2017 · 32 comments
Closed

Error encountered resolving symbol values statically #937

antoineabourjeilycme opened this issue Jan 4, 2017 · 32 comments

Comments

@antoineabourjeilycme
Copy link

Using:

  • angular version: 2.4.1
  • jquery version: 3.1.1
  • datatables version: 1.10.13
  • angular-datatables version: 2.0.1

Console log:
Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /node_modules/angular-datatables/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in /node_modules/angular-datatables/node_modules/@angular/core/src/metadata.d.ts, resolving symbol NgModule in /node_modules/angular-datatables/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in /node_modules/angular-datatables/node_modules/@angular/core/index.d.ts, resolving symbol DataTablesModule in /node_modules/angular-datatables/dist/angular-datatables.module.d.ts, resolving symbol DataTablesModule in /node_modules/angular-datatables/dist/angular-datatables.module.d.ts

angular/angular-cli#3707

@antoineabourjeilycme
Copy link
Author

Update
When I used only ng build --dev without -aot I got
"ERROR in DataTablesModule is not an NgModule"

@l-lin
Copy link
Owner

l-lin commented Jan 10, 2017

What's your angular-cli.json configuration? Can you show your Angular App code?

@antoineabourjeilycme
Copy link
Author

antoineabourjeilycme commented Jan 10, 2017

{
  "project": {
    "version": "1.0.0-beta.24",
    "name": "----"
  },
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "",
      "mobile": false,
      "styles": [
       ----
      ],
      "scripts": [
        "../node_modules/jquery/dist/jquery.js",
        "../node_modules/datatables.net/js/jquery.dataTables.js"
      ],
      "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "addons": [],
  "packages": [],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "sass",
    "prefixInterfaces": false,
    "inline": {
      "style": false,
      "template": false
    },
    "spec": {
      "class": false,
      "component": true,
      "directive": true,
      "module": false,
      "pipe": true,
      "service": true
    }
  }
}

@l-lin
Copy link
Owner

l-lin commented Jan 22, 2017

As mentionned in this comment, angular-datatables is compatible with angular-cli version 1.0.0-beta.21, newer versions are not certain.
I will not really fix this until angular-cli release a stable version.

@toniton
Copy link

toniton commented Apr 13, 2017

@angular/cli is stable at v1.0.0 now and i'm getting this error

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider repla cing the function or lambda with a reference to an exported function, resolving symbol NgModule in /Users/mac/Documents/Projects/nodejs/fixershub /node_modules/angular-datatables/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in /Users/mac/Documents/Projec ts/nodejs/fixershub/node_modules/angular-datatables/node_modules/@angular/core/src/metadata.d.ts, resolving symbol NgModule in /Users/mac/Documen ts/Projects/nodejs/fixershub/node_modules/angular-datatables/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in /Users/mac/Do cuments/Projects/nodejs/fixershub/node_modules/angular-datatables/node_modules/@angular/core/index.d.ts, resolving symbol DataTablesModule in /Us ers/mac/Documents/Projects/nodejs/fixershub/node_modules/angular-datatables/src/angular-datatables.module.d.ts, resolving symbol DataTablesModule in /Users/mac/Documents/Projects/nodejs/fixershub/node_modules/angular-datatables/src/angular-datatables.module.d.ts

@l-lin
Copy link
Owner

l-lin commented Apr 16, 2017

Are you using angular 4? If so, then angular-datatables is still not compatible with version 4+.
Follow the issue #998 when it will be supported.

@pvanhemmen
Copy link

pvanhemmen commented Jun 13, 2017

Sorry to bring this problem up again, but with the latest angular-datatables (4.1.1) and the latest Angular Version (4.2.2) the problem still persists. Building for production throws the following slightly altered error:

Error encountered resolving symbol values statically. Calling function 'ɵmakeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /Users/paulvanhemmen/site/web/node_modules/angular-datatables/node_modules/@angular/core/core.d.ts, resolving symbol DataTablesModule in /Users/paulvanhemmen/site/web/node_modules/angular-datatables/src/angular-datatables.module.d.ts, resolving symbol DataTablesModule in /Users/paulvanhemmen/site/web/node_modules/angular-datatables/src/angular-datatables.module.d.ts

Anything I can do about it? Thanx!

@pvanhemmen
Copy link

pvanhemmen commented Jun 13, 2017

As a follow up, I was able to fix this issue by using the following workaround, see comment here and here.

Just wondering if that's something completely out of range for the implementation the angular-datatables Module?

@l-lin l-lin reopened this Jun 13, 2017
@l-lin
Copy link
Owner

l-lin commented Jun 13, 2017

Indeed. I'm checking.

@l-lin
Copy link
Owner

l-lin commented Jun 13, 2017

Mmmh I seem to reproduce the issue with Node version 8.0.0 and NPM version 5.0.0.
However, with the previous version (Node 7.10.0 and NPM 4.2.0), I don't have any issue.

@pvanhemmen, what versions of Node and NPM are you using?

@pvanhemmen
Copy link

Hey thanx for checking back.

On my dev machine I have

npm 4.2.0
nodejs v7.10.0

Nonetheless I get the same error on a different setup, where I have

npm 4.6.1
nodejs v6.10.2

Angular + CLI and angular-datatables are up to date:

angular/* 4.2.2
angular/cli 1.0.4
angular-datatables 4.1.1
typescript 2.3.2

Compiling settings are pretty straight forward as they are angular cli default values. If I can help with anything else, please let me know.

@fernandoTorresan
Copy link

fernandoTorresan commented Jun 14, 2017

I have the same issue here:

ERROR in Error encountered resolving symbol values statically. Calling function 'ɵmakeDecorator', function calls are not supported.

angular: 4.2.2
angular-datatables 4.1.1
typescript: 2.3.4

@angular/cli: 1.1.1
node: 8.1.0
os: linux x64
npm: 5.0.3

And i I discovered this issue in angular repository angular/angular#15767

I think my project is specifically breaking because of the angular-datatables.module.d.ts

@fernandoTorresan
Copy link

fernandoTorresan commented Jun 14, 2017

@pvanhemmen Your workaround worked for me, thank you!
Add into tsconfig.app.json

"compilerOptions": {
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "lib": [
      "es2016",
      "dom"
    ],
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "baseUrl": "",
    "types": [],
      "paths": {
      "@angular/*": ["../node_modules/@angular/*"] 
    }
  }

where was added: "paths": { "@angular/*": ["../node_modules/@angular/*"]

@minhthuan274
Copy link

Thank you, you saved my life

l-lin added a commit that referenced this issue Jun 18, 2017
Updating the following:
- @angular 4.2.3+
- @angular/cli 1.1.2
- Add documentation for the error about resolving symbol values
  statically #937
- Support Node 8/NPM 5
@l-lin l-lin added documentation and removed bug labels Jun 18, 2017
@l-lin
Copy link
Owner

l-lin commented Jun 18, 2017

Documentation added.

@l-lin l-lin closed this as completed Jun 18, 2017
l-lin added a commit that referenced this issue Jun 18, 2017
@nileshyadav326
Copy link

don't know why after adding above code my issue is not resolved for temporary I deleted the node_modue folder inside the angular-datatable folder and its works fine

@l-lin
Copy link
Owner

l-lin commented Jun 19, 2017

@nileshyadav326, what was inside the node_modules folder?

What are the versions of the Node and NPM?

@nileshyadav326
Copy link

npm version 5.0.1
node version 7.10.0
the node_module (angular-datatable/node_module) folder contain below folders

@jeremybv89
Copy link

Hello, does anyone know how to change the language?

@hirakagile
Copy link

Hello, anyone faced following issue??
notsup Unsupported platform for fsevents@https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
node version : 8.9.4
npm version : 5.6.0
Please help me out

@captainjaypee01
Copy link

Can anyone help me on how to figure about the issue on not displaying the values in my datatables
I'm using latest angular cli version. There are no errors, it's just that the values are not showing in my table

@sivan-nsp
Copy link

I am facing error after adding the above code
error

ERROR in ./src/main.ts
Module not found: Error: Can't resolve 'C:\Users
ent\src'
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve 'C:\Users
ent\src\app'
ERROR in ./src/app/app.component.ts
Module not found: Error: Can't resolve 'C:\Users
ent\src\app'
ERROR in ./src/app/angular-material/angular-mater
Module not found: Error: Can't resolve 'C:\Users
ent\src\app\angular-material'
ERROR in ./src/app/dashboard/dashboard.component.
Module not found: Error: Can't resolve 'C:\Users
ent\src\app\dashboard'

@ag5593
Copy link

ag5593 commented Sep 10, 2018

I am facing problem of (click) event on FixedColumns in dataTable. When column is fixed or freeze angular click event does not work. However it works if column is not fixed or freeze. Anyone faced similar issue or knows solution for the same ?

@selvam326
Copy link

selvam326 commented Dec 23, 2018

how to apply colors in datatable.?

@MishaBeskin
Copy link

How correctly add language to table options on Angular 7
thanks

@ImRehanK
Copy link

Good Mornings,

Does any body know how to add "pagination change event"?

Thanks in advance.

@MFahadMuzamil
Copy link

I am facing problem data-table not workable. show me error console
39124076-afaf0404-4717-11e8-8cd0-af2f6176220e

@jayeshwasnik
Copy link

@MFahadMuzamil downgrade you angular version to 8 or below.I think you are using angular 9.

@Saroj-K-Panda
Copy link

Hello,
Is this data table can handle millions of records and with great performance in filtering as well.. Please reply.
Thanks in advance.

@Manishac12
Copy link

I am facing problem data-table not workable. show me error console and im using angualr 8
9110 ERROR TypeError: table.DataTable is not a function
at SafeSubscriber._next (merchant.component.ts:79)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:185)
at SafeSubscriber.next (Subscriber.js:124)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at MapSubscriber._next (map.js:35)
at MapSubscriber.next (Subscriber.js:49)
at FilterSubscriber._next (filter.js:33)
at FilterSubscriber.next (Subscriber.js:49)
at MergeMapSubscriber.notifyNext (mergeMap.js:69)

@faisalshafisit
Copy link

faisalshafisit commented Nov 27, 2020

@MFahadMuzamil downgrade you angular version to 8 or below.I think you are using angular 9.

Using angular 10.
Can't downgrade. Too many complications. CDK plugin used which is incompatible with angular < 8

@faisalshafisit
Copy link

I am facing problem data-table not workable. show me error console and im using angualr 8
9110 ERROR TypeError: table.DataTable is not a function
at SafeSubscriber._next (merchant.component.ts:79)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:185)
at SafeSubscriber.next (Subscriber.js:124)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at MapSubscriber._next (map.js:35)
at MapSubscriber.next (Subscriber.js:49)
at FilterSubscriber._next (filter.js:33)
at FilterSubscriber.next (Subscriber.js:49)
at MergeMapSubscriber.notifyNext (mergeMap.js:69)

Did you solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests