Reputation: 547
I have just included the Gojs in my current angular project.
The steps I have followed
npm install gojs --save
and in my app component, i just imported gojs
import * as go from 'gojs';
after that when i run ng serve/build i am getting below errors.
RROR in node_modules/gojs/release/go.d.ts(14239,27): error TS1005: ')' expected.
node_modules/gojs/release/go.d.ts(14239,45): error TS1005: ',' expected.
node_modules/gojs/release/go.d.ts(14239,68): error TS1005: ',' expected.
node_modules/gojs/release/go.d.ts(14240,16): error TS1005: ',' expected.
node_modules/gojs/release/go.d.ts(14240,38): error TS1005: ',' expected.
node_modules/gojs/release/go.d.ts(14241,43): error TS1005: ',' expected.
node_modules/gojs/release/go.d.ts(14242,5): error TS1138: Parameter declaration expected.
node_modules/gojs/release/go.d.ts(14242,7): error TS1128: Declaration or statement expected.
node_modules/gojs/release/go.d.ts(14242,11): error TS1128: Declaration or statement expected.
node_modules/gojs/release/go.d.ts(14242,12): error TS1128: Declaration or statement expected.
node_modules/gojs/release/go.d.ts(14242,14):
Pacakage.json
"@angular/cli": "~6.0.3",
"@angular/compiler-cli": "~6.0.2",
"@angular/language-service": "~6.0.2",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"gulp": "^4.0.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "~0.2.2",
"minimist": "~1.2.0",
"ng-packagr": "~3.0.0-rc.2",
"protractor": "^5.4.1",
"ts-node": "~5.0.1",
"tsickle": ">=0.25.5",
"tslib": "~1.7.1",
"tslint": "~5.9.1",
"typescript": "^2.7.2"
Upvotes: 2
Views: 920
Reputation: 547
Thanks @walter Northwoods,
I just downgraded GOJS 2.* to 1.8*
npm install [email protected]
Resolved the issue.
Upvotes: 0
Reputation: 393
You need to upgrade your TypeScript version.
The go.d.ts file requires v2.8.
To upgrade your current TypeScript Verison do: npm install -g typescript@latest
.
Upvotes: 2