Skip to content

compiler_1.Version is not a constructor #9415

@nimatrazmjo

Description

@nimatrazmjo

Versions

<!--
Output from: `ng --version`.
If nothing, output from: `node --version` and `npm --version`.
  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
-->
To disable this warning use "ng set --global warnings.versionMismatch=false".
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.4.7
node: 9.3.0
os: linux x64
@angular/animations: 4.4.6
@angular/cdk: 2.0.0-beta.12
@angular/common: 4.4.6
@angular/compiler: 4.4.6
@angular/core: 4.4.6
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/material: 2.0.0-beta.12
@angular/platform-browser: 4.4.6
@angular/platform-browser-dynamic: 4.4.6
@angular/platform-server: 4.4.6
@angular/router: 4.4.6
@angular/cli: 1.4.7
@angular/compiler-cli: 5.0.5
@ngtools/webpack: 1.9.6
typescript: 2.5.3


Repro steps

  • Step 1
  • Step 2
  • Step 3

Observed behavior


npm start

> admin-panel@0.0.0 start /home/razmjo/workstation/jobsaf-website
> npm run server:dev

> admin-panel@0.0.0 server:dev /home/razmjo/workstation/jobsaf-website
> npm run webpack-dev-server -- --config config/webpack.dev.js --open --progress --profile --watch --content-base src/


> admin-panel@0.0.0 webpack-dev-server /home/razmjo/workstation/jobsaf-website
> node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.dev.js" "--open" "--progress" "--profile" "--watch" "--content-base" "src/"

/home/razmjo/workstation/jobsaf-website/node_modules/@angular/compiler-cli/src/version.js:19
exports.VERSION = new compiler_1.Version('5.0.5');
                  ^

TypeError: compiler_1.Version is not a constructor
    at Object.<anonymous> (/home/razmjo/workstation/jobsaf-website/node_modules/@angular/compiler-cli/src/version.js:19:19)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/razmjo/workstation/jobsaf-website/node_modules/@angular/compiler-cli/index.js:27:17)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! admin-panel@0.0.0 webpack-dev-server: `node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js "--config" "config/webpack.dev.js" "--open" "--progress" "--profile" "--watch" "--content-base" "src/"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the admin-panel@0.0.0 webpack-dev-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/razmjo/.npm/_logs/2018-01-28T14_58_23_345Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! admin-panel@0.0.0 server:dev: `npm run webpack-dev-server -- --config config/webpack.dev.js --open --progress --profile --watch --content-base src/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the admin-panel@0.0.0 server:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/razmjo/.npm/_logs/2018-01-28T14_58_23_355Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! admin-panel@0.0.0 start: `npm run server:dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the admin-panel@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/razmjo/.npm/_logs/2018-01-28T14_58_23_365Z-debug.log

<!-- Normally this includes a stack trace and some more information. -->

Desired behavior

Mention any other details that might be useful (optional)

package.json

{
  "name": "admin-panel",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "build:aot:prod": "npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js  --progress --profile --bail",
    "build:aot": "npm run build:aot:prod",
    "build:aot:dev": "cross-env BUILD_AOT=1 npm run build:dev",
    "build:dev": "npm run clean:dist && npm run webpack -- --config config/webpack.dev.js --progress --profile",
    "build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .",
    "build:prod": "npm run clean:dist && npm run webpack -- --config config/webpack.prod.js  --progress --profile --bail",
    "build": "npm run build:dev",
    "ci:aot": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:aot && npm run e2e",
    "ci:jit": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:prod && npm run e2e",
    "ci:nobuild": "npm run lint && npm test && npm run e2e",
    "ci:testall": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
    "ci:travis": "cross-env BUILD_E2E=1 npm run lint && npm run test && npm run build:aot && npm run e2e:travis",
    "ci": "npm run ci:testall",
    "clean:dll": "npm run rimraf -- dll",
    "clean:aot": "npm run rimraf -- compiled",
    "clean:dist": "npm run rimraf -- dist",
    "clean:install": "npm set progress=false && npm install",
    "clean": "npm cache clean --force && npm run rimraf -- node_modules doc coverage dist compiled dll",
    "docker": "docker",
    "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
    "docs:compodoc": "compodoc -p tsconfig.json",
    "docs:compodoc:serve": "compodoc -p tsconfig.json -s",
    "docs:compodoc:serve:watch": "compodoc -p tsconfig.json -s -w",
    "e2e:live": "npm-run-all -p -r server:prod:ci protractor:live",
    "e2e:travis": "npm-run-all -p -r server:prod:ci protractor:delay",
    "e2e": "npm-run-all -p -r server:prod:ci protractor",
    "github-deploy:dev": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
    "github-deploy:prod": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
    "github-deploy": "npm run github-deploy:dev",
    "lint": "npm run tslint \"src/**/*.ts\"",
    "node": "node",
    "postinstall": "npm run webdriver:update",
    "postversion": "git push && git push --tags",
    "preclean:install": "npm run clean",
    "preversion": "npm test",
    "protractor": "protractor",
    "protractor:delay": "sleep 3 && npm run protractor",
    "protractor:live": "protractor --elementExplorer",
    "rimraf": "rimraf",
    "server:dev:hmr": "npm run server:dev -- --hotOnly",
    "server:aot:dev": "cross-env BUILD_AOT=1 npm run server:dev",
    "server:dev": "npm run webpack-dev-server -- --config config/webpack.dev.js --open --progress --profile --watch --content-base src/",
    "server:prod": "http-server dist -c-1 --cors",
    "server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
    "server": "npm run server:dev",
    "start:hmr": "npm run server:dev:hmr",
    "start": "npm run server:dev",
    "start:aot": "npm run server:aot:dev",
    "test": "npm run lint && karma start",
    "tslint": "tslint",
    "typedoc": "typedoc",
    "version": "npm run build",
    "watch:dev:hmr": "npm run watch:dev -- --hot",
    "watch:dev": "npm run build:dev -- --watch",
    "watch:aot:dev": "npm run build:aot:dev -- --watch",
    "watch:prod": "npm run build:prod -- --watch",
    "watch:aot:prod": "npm run build:aot:prod -- --watch",
    "watch:test": "npm run test -- --auto-watch --no-single-run",
    "watch": "npm run watch:dev",
    "webdriver-manager": "node ./node_modules/protractor/bin/webdriver-manager",
    "webdriver:start": "node ./node_modules/protractor/bin/webdriver-manager start",
    "webdriver:update": "node ./node_modules/protractor/bin/webdriver-manager update",
    "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
    "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
  },
  "private": true,
  "napa": {
    "jquery.flot.spline": "miloszfalinski/jquery.flot.spline",
    "ika.jvectormap": "kakirigi/ika.jvectormap"
  },
  "dependencies": {
    "@angular/animations": "^4.4.4",
    "@angular/cdk": "^2.0.0-beta.8",
    "@angular/common": "^4.4.4",
    "@angular/compiler": "^4.4.4",
    "@angular/core": "^4.4.4",
    "@angular/forms": "^4.4.4",
    "@angular/http": "^4.4.4",
    "@angular/material": "^2.0.0-beta.8",
    "@angular/platform-browser": "^4.4.4",
    "@angular/platform-browser-dynamic": "^4.4.4",
    "@angular/platform-server": "^4.4.4",
    "@angular/router": "^4.4.4",
    "@angularclass/hmr": "~2.1.3",
    "@angularclass/hmr-loader": "~3.0.2",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5",
    "@ng-idle/core": "^2.0.0-beta.10",
    "@ng-idle/keepalive": "^2.0.0-beta.10",
    "@ngx-loading-bar/core": "^1.1.0",
    "@ngx-loading-bar/http": "^1.1.0",
    "@ngx-loading-bar/http-client": "^1.1.0",
    "@ngx-loading-bar/router": "^1.1.0",
    "@swimlane/ngx-datatable": "^10.3.0",
    "@toverux/ngsweetalert2": "^2.0.1",
    "@types/cropperjs": "^1.1.0",
    "@types/file-saver": "0.0.1",
    "@types/ip": "0.0.30",
    "@types/jquery": "^3.2.13",
    "@types/jspdf": "^1.1.31",
    "@types/mime-types": "^2.1.0",
    "@types/socket.io": "^1.4.29",
    "@types/socket.io-client": "^1.4.31",
    "@types/webpack": "^3.0.13",
    "ag-grid": "^13.3.1",
    "ag-grid-angular": "^13.3.0",
    "angular-cropperjs": "^0.1.5",
    "angular-date-value-accessor": "0.0.2",
    "angular-image-cropper": "^1.2.0",
    "angular-linkedin-sdk": "^0.1.7",
    "angular-svg-round-progressbar": "^1.1.1",
    "angular2-flash-messages": "^1.0.5",
    "angular2-focus": "^1.1.0",
    "angular2-image-zoom": "^1.2.1",
    "angular2-infinite-scroll": "^0.3.43",
    "angular2-jwt": "^0.2.3",
    "angular2-localstorage": "^0.4.0",
    "angular2-material-datepicker": "^0.5.0",
    "angular2-moment": "^1.7.0",
    "angular2-prettyjson": "^2.0.5",
    "angular2-tag-input": "^1.2.3",
    "angular2-text-mask": "^8.0.4",
    "angular2-toaster": "^4.0.1",
    "angular2-tree-component": "^3.1.0",
    "angular2-ui-switch": "^1.2.0",
    "angular2-wizard": "^0.4.0",
    "async": "^2.3.0",
    "asynckit": "^0.4.0",
    "base32": "0.0.6",
    "binary-pack": "^1.0.2",
    "bootstrap": "^3.3.6",
    "bootstrap-modal": "^2.2.0",
    "buffer": "^5.0.8",
    "chart.js": "^2.5.0",
    "codemirror": "^5.30.0",
    "compression": "^1.0.3",
    "core-js": "^2.4.1",
    "cors": "^2.5.2",
    "cropper": "^3.1.3",
    "cropperjs": "^1.1.3",
    "crypto-js": "^3.1.9-1",
    "dgram": "^1.0.1",
    "dns": "^0.2.2",
    "dotenv": "^4.0.0",
    "duplex": "^1.0.0",
    "easy-pie-chart": "^2.1.7",
    "easyimage": "^2.1.0",
    "express-useragent": "^1.0.7",
    "file-saver": "^1.3.3",
    "flot": "^0.8.0-alpha",
    "font-awesome": "^4.7.0",
    "fs": "0.0.1-security",
    "fullcalendar": "^3.2.0",
    "gulp": "^3.9.1",
    "gulp-ssh": "^0.6.0",
    "helmet": "^3.9.0",
    "http-server": "^0.10.0",
    "ie-shim": "^0.1.0",
    "ip": "^1.1.5",
    "izitoast": "1.1.5",
    "jqcloud2": "^2.0.2",
    "jquery": "^3.2.1",
    "jquery-slimscroll": "^1.3.8",
    "jquery-sparkline": "^2.4.0",
    "jquery.browser": "^0.1.0",
    "jquery.flot.tooltip": "github:krzysu/flot.tooltip",
    "jsonpath-plus": "^0.16.0",
    "jspdf": "^1.3.5",
    "jszip": "^2.4.0",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.4",
    "mammoth": "^1.4.1",
    "md-autocomplete": "0.0.1-alpha.1",
    "mime-types": "^2.1.15",
    "modernizr": "^3.3.1",
    "moment": "^2.17.1",
    "monaco-editor": "^0.10.0",
    "mongoosastic": "^4.3.0",
    "multer": "^1.3.0",
    "mydatepicker": "^2.0.32",
    "net": "^1.0.2",
    "ng-circle-progress": "^0.9.8",
    "ng-recaptcha": "^3.0.2",
    "ng-validators": "^0.2.1",
    "ng2-accordion": "0.0.15",
    "ng2-archwizard": "^2.1.0",
    "ng2-auto-complete": "^0.12.0",
    "ng2-bootstrap": "1.4.0",
    "ng2-bootstrap-modal": "^1.0.1",
    "ng2-bs3-modal": "^0.13.0",
    "ng2-charts": "^1.5.0",
    "ng2-completer": "^1.6.1",
    "ng2-cookies": "^1.0.4",
    "ng2-device-detector": "^1.0.0",
    "ng2-dnd": "^4.2.0",
    "ng2-file-upload": "^1.2.0",
    "ng2-image-lazy-load": "^2.0.9",
    "ng2-imageupload": "^1.4.2",
    "ng2-img-cropper": "^0.9.0",
    "ng2-modal": "0.0.25",
    "ng2-pagination": "^2.0.1",
    "ng2-password-strength": "^1.0.8",
    "ng2-password-strength-bar": "^1.1.3",
    "ng2-select": "^1.2.0",
    "ng2-simple-autocomplete": "^0.5.2",
    "ng2-tag-input": "^1.4.1",
    "ng2-toastr": "^4.1.2",
    "ng2-translate": "^5.0.0",
    "ng2-validation": "^4.2.0",
    "ngx-accordion": "0.0.17",
    "ngx-auth": "^2.3.0",
    "ngx-bootstrap": "^1.9.3",
    "ngx-chips": "^1.5.3",
    "ngx-facebook": "^2.4.0",
    "ngx-infinite-scroll": "^0.5.2",
    "ngx-intl-tel-input": "^1.0.6",
    "ngx-loading": "^1.0.14",
    "ngx-pagination": "^3.0.1",
    "ngx-quill-editor": "^2.2.2",
    "ngx-tabs": "0.0.13",
    "ngx-toastr": "^8.0.0",
    "ngx-uploader": "4.0.0",
    "node-sass": "^4.5.0",
    "node-schedule": "^1.2.1",
    "node-wkhtmltopdf": "^2.0.0",
    "os": "^0.1.1",
    "pdf-text-extract": "^1.5.0",
    "prettier": "^1.4.4",
    "primus": "^7.1.0",
    "reflect-metadata": "^0.1.10",
    "rxjs": "^5.1.0",
    "screenfull": "^3.0.2",
    "script-loader": "^0.7.2",
    "serve-favicon": "^2.0.1",
    "sha512": "0.0.1",
    "sharp": "^0.18.2",
    "shebang-command": "^1.2.0",
    "showdown": "^1.7.4",
    "simple-line-icons": "^2.4.1",
    "socket.io": "^2.0.2",
    "socket.io-client": "^2.0.4",
    "socketio-auth": "^0.1.0",
    "speakeasy": "^2.0.0",
    "spinkit": "^1.2.5",
    "stripe": "^5.1.1",
    "strong-error-handler": "^2.3.0",
    "strong-pubsub": "^0.2.0",
    "strong-pubsub-bridge": "^0.2.1",
    "strong-pubsub-connection-mqtt": "^0.1.2",
    "strong-pubsub-mqtt": "^0.1.0",
    "summernote": "^0.8.2",
    "sweetalert2": "^7.0.6",
    "swiper": "^3.4.2",
    "tinymce": "^4.6.4",
    "tls": "0.0.1",
    "transient": "^2.0.1",
    "ts-helpers": "^1.1.2",
    "typings": "^2.1.1",
    "underscore": "^1.8.3",
    "url": "^0.11.0",
    "useragent": "^2.1.13",
    "uuid": "^3.1.0",
    "weather-icons": "1.3.2",
    "webpack": "^3.1.0",
    "whirl": "github:jh3y/whirl",
    "wkhtmltopdf": "^0.3.4",
    "xlsx": "^0.11.17",
    "xlsx-style": "^0.8.13",
    "zone": "^0.3.4",
    "zone.js": "^0.8.18",
    "zxcvbn": "^4.4.2"
  },
  "devDependencies": {
    "@angular/cli": "1.4.7",
    "@swimlane/ngx-datatable": "^10.2.3",
    "@types/codemirror": "0.0.48",
    "@types/lodash": "^4.14.77",
    "@types/moment": "2.13.0",
    "@types/underscore": "^1.8.0",
    "base-href-webpack-plugin": "^1.0.2",
    "jasmine-spec-reporter": "~4.2.1",
    "json-loader": "^0.5.4",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-read-json": "^1.1.0",
    "loaders.css": "^0.1.2",
    "napa": "^3.0.0",
    "ng-router-loader": "^2.1.0",
    "script-loader": "^0.7.2",
    "webdriver-manager": "12.0.6",
    "@types/dotenv": "^4.0.1",
    "@types/quill": "^1.3.4",
    "dotenv": "^4.0.0",
    "@types/socket.io-client": "^1.4.29",
    "angular2-prettyjson": "^2.0.3",
    "eslint": "^4.9.0",
    "husky": "^0.14.3",
    "lint-staged": "^4.3.0",
    "loader-utils": "^1.1.0",
    "nsp": "^2.1.0",
    "@angular-devkit/build-optimizer": "^0.0.32",
    "@angular/compiler-cli": "~5.0.1",
    "@compodoc/compodoc": "^1.0.0-beta.15",
    "@ngtools/webpack": "^1.8.0",
    "@types/hammerjs": "^2.0.34",
    "@types/jasmine": "2.5.45",
    "@types/node": "^7.0.39",
    "@types/source-map": "^0.5.0",
    "@types/uglify-js": "^2.6.28",
    "@types/webpack": "^2.2.16",
    "add-asset-html-webpack-plugin": "^1.0.2",
    "angular2-template-loader": "^0.6.2",
    "assets-webpack-plugin": "^3.5.1",
    "awesome-typescript-loader": "^3.3.0",
    "codelyzer": "~2.1.1",
    "copy-webpack-plugin": "^4.0.1",
    "cross-env": "^5.0.0",
    "css-loader": "^0.28.0",
    "exports-loader": "^0.6.4",
    "expose-loader": "^0.7.3",
    "extract-text-webpack-plugin": "~3.0.0",
    "file-loader": "^0.11.1",
    "find-root": "^1.0.0",
    "gh-pages": "^1.0.0",
    "html-webpack-plugin": "^2.28.0",
    "imports-loader": "^0.7.1",
    "inline-manifest-webpack-plugin": "^3.0.1",
    "istanbul-instrumenter-loader": "2.0.0",
    "jasmine-core": "^2.5.2",
    "karma": "^1.6.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "^1.1.0",
    "karma-mocha-reporter": "^2.2.3",
    "karma-remap-coverage": "^0.1.4",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "^2.0.4",
    "ngc-webpack": "^4.0.2",
    "node-sass": "^4.5.2",
    "npm-run-all": "^4.0.2",
    "optimize-js-plugin": "0.0.4",
    "parse5": "^3.0.2",
    "preload-webpack-plugin": "^1.2.2",
    "protractor": "^5.1.1",
    "raw-loader": "0.5.1",
    "rimraf": "~2.6.1",
    "sass-loader": "^6.0.3",
    "script-ext-html-webpack-plugin": "^1.8.5",
    "source-map-loader": "^0.2.1",
    "string-replace-loader": "~1.3.0",
    "style-loader": "^0.18.1",
    "to-string-loader": "^1.1.5",
    "ts-node": "^3.3.0",
    "tslib": "^1.7.1",
    "tslint": "~4.5.1",
    "tslint-loader": "^3.5.2",
    "typedoc": "^0.7.1",
    "typescript": "~2.5.2",
    "uglifyjs-webpack-plugin": "^1.0.1",
    "url-loader": "^0.5.8",
    "webpack": "^3.8.1",
    "webpack-dev-middleware": "^1.10.1",
    "webpack-dev-server": "~2.7.1",
    "webpack-dll-bundles-plugin": "^1.0.0-beta.5",
    "webpack-merge": "~4.1.0"
  },
  "lint-staged": {
    "*.js": [
      "eslint --fix",
      "prettier --write",
      "git add"
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions