Open st-clair-clarke opened 7 years ago
at least
declare var Buffer: any;
in typings.d.ts removes the error
I am running @angular.cli rc.1 and removed this error adding
"types": ["node"]
in to tsconfig.app.json
typescript: ...ttpTest/httpTest/node_modules/ng2-smart-table/src/ng2-smart-table/lib/helpers.ts, line: 3
Cannot find name 'Buffer'.
L2: return (
L3: val instanceof Buffer
L4: || val instanceof Date
Cannot find name 'Buffer'.
L9: function cloneSpecificValue(val): any {
L10: if (val instanceof Buffer) {
L11: var x = new Buffer(val.length);
Cannot find name 'Buffer'.
L10: if (val instanceof Buffer) {
L11: var x = new Buffer(val.length);
L12: val.copy(x);
[08:55:46] typescript: ...ttpTest/httpTest/node_modules/ng2-smart-table/src/ng2-smart-table/lib/helpers.ts, line: 10
[08:55:46] typescript: ...ttpTest/httpTest/node_modules/ng2-smart-table/src/ng2-smart-table/lib/helpers.ts, line: 11
[08:55:46] transpile failed
[08:55:46] ionic-app-script task: "build"
[08:55:46] Error: Error
The fixes above did not work for me :/
Hi @digaus,
The fix from @kjetilhp worked for me, you might want to check your configuration; I am running Node.JS v6.10 and npm v3.10.10.
If you're using the quickstart seed from the Angular project (the one with instructions to clone the GitHub repo), don't follow that, instead, follow the CLI Quickstart
I am trying to use it in an Ionic 2 project...
cordova CLI: 6.5.0
Ionic Framework Version: 2.1.0-201703061537
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.0
Xcode version: Not installed
I have the same issue, Running Angular CLI 1.0.0, node v7.2.0 and npm 4.4.4, there's no tsconfig.app.json but just tsconfig.json..have added that "types": ["node"] and didn't work, also added declare var Buffer: any; to typings.d.ts..and nothing...weird thing is that my IDE (Webstorm) does resolve Buffer.
@fizdalf try to install the latest ng2-smart-table version npm i -S ng2-smart-table@latest
.
Hi, I am running @angular.cli rc.0 and getting the following error with ng-serve