question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running ang8

See original GitHub issue

Type of Issue

[ X ] Bug Report
[ ] Feature Request

Description

_A bug: I have a plugin working with ang7

but when I try to upgrade to 8, i receive an error

Here is the error on travis:

ng-packagr

/ng-gantt/node_modules/tslib/tslib.js:65
        extendStatics(d, b);
        ^

TypeError: Object prototype may only be an Object or null: undefined
    at setPrototypeOf (<anonymous>)
    at Object.__extends (/ng-gantt/node_modules/tslib/tslib.js:65:9)
    at /ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:115:17
    at /ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:314:6
    at /ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:3:17
    at Object.<anonymous> (/ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/template.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at /ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/transform.js:20:22
    at /ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/transform.js:10:17
    at Object.<anonymous> (/ng-gantt/node_modules/@angular/compiler-cli/src/ngtsc/indexer/src/transform.js:16:3)
    at Module._compile (internal/modules/cjs/loader.js:759:30)

How To Reproduce

_A bug: Clone this branch

Try to run ng-packagr -p ng-gantt/package.json

Expected Behaviour

_A bug: Expected that this would build the same that happens in master branch, that is using angular 7 version.

Here the last build that was passing:

https://travis-ci.com/jsGanttImproved/ng-gantt/builds/121690974

Version Information

$ node_modules/.bin/ng-packagr --version

I cant run this because the error occurs when run ng-packagr

This was the ang7 version:

node_modules/.bin/ng-packagr --version
ng-packagr:            4.4.5
@angular/compiler:     7.1.4
rollup:                0.67.4
tsickle:               0.27.2
typescript:            3.1.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
brq-crcommented, Aug 17, 2019

dependencies/@angular/cli and devDependencies/@angular/compiler-cli both must have the same version number.

1reaction
alan-agius4commented, Aug 4, 2019

The problem seems to be that you have multiple @angular/compiler defined as your dependencies, and also your @angular/<package> versions are not aligned.

Use this package.json

{
  "name": "ng-gantt",
  "version": "0.0.0",
  "private": true,
  "license": "MIT",
  "scripts": {
    "start": "ng serve",
    "build": "npm run copy && ng build",
    "copy": "cp -R dist/ng-gantt src/ng-gantt",
    "build:app": "npm run copy && ng build --project packages && rimraf src/ng-gantt",
    "build:lib": "rimraf dist && ng-packagr -p ng-gantt/package.json",
    "publish-npm": "npm run build:lib && cd dist/ng-gantt && npm publish",
    "reload": "npm run build:lib && npm run build && npm run start",
    "dev": "cd dist/app && http-server",
    "test": "ng test dev --watch=false && npm run e2e",
    "unittest": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "kill": "kill -9 $(lsof -t -i:4200)",
    "reinstall": "rm package-lock.json && rm -rf node_modules && npm i",
    "sass:rebuild": "npm rebuild node-sass"
  },
  "dependencies": {
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/http": "^7.2.15",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "core-js": "^2.4.1",
    "rxjs": "^6.4.0",
    "webpack": "^4.16.1",
    "zone.js": "^0.9.0",
    "jsgantt-improved": "^2.4.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.802.0",
    "@angular/cli": "~8.2.0",
    "@angular/compiler-cli": "~8.2.0",
    "@angular/language-service": "~8.2.0",
    "@types/jasmine": "3.3.8",
    "@types/node": "~10.1.0",
    "codelyzer": "~5.0.0",
    "cpr": "^3.0.0",
    "jasmine": "^3.3.0",
    "jasmine-core": "^3.3.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^2.0.0",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "rimraf": "^2.6.1",
    "ts-node": "^8.0.0",
    "tslib": "^1.9.0",
    "tslint": "~5.15.0",
    "ng-packagr": "4.4.5",
    "rollup": "0.67.4",
    "tsickle": "^0.36.0",
    "typescript": "~3.5.0"
  }
}

Also it is important to highlight that in ng-packagr version 4.x, Angular version 8 is not supported. Angular version 8 is supported by ng-packagr 5+

Read more comments on GitHub >

github_iconTop Results From Across the Web

error while running code in angular project - Stack Overflow
ERROR in Module build failed (from ./node_modules/postcss-loader/src/index.js): SyntaxError. (1:1) Unknown word.
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
Introduction. Angular is a powerful framework that allows you to both build and deploy your apps very easily. Inevitably, you will run into ......
Read more >
幸运刮刮乐app-【 官网so195·com 】-亚星百家乐-幸运刮刮乐 ...
Liquid error (sections/collection-listLeftSidebar-template.liquid line 150): Could not find asset snippets/spurit_dmr_collection_template_snippet.liquid.
Read more >
A problem with setting an actual scan as nominal
Before running the program, edit the scan and change the Execution to ... 100x what error I would've expected - but only in...
Read more >
ANG 8 Flashcards | Quizlet
control tower. wieża kontrolna. overtaking. wyprzedzanie. error. błąd. run over. przejechać kogoś. run out of. skończyć się. give away. przestać działać.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found