Angular-cli: ng build --prod ENOENT Error opening material components

Created on 9 Jun 2016  路  5Comments  路  Source: angular/angular-cli

1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OS X Yosemite 10.10.5 and Ubuntu 12.04

2. Versions. Please run ng --version. If there's nothing outputted, please

OS X Yosemite:

  • node: 4.2.4
  • npm: 3.8.7
  • angular-cli: 1.0.0-beta.5 (not mobile)

Ubuntu:

  • node: 4.4.5
  • npm: 2.15.5
  • angular-cli: 1.0.0-beta.5 (not mobile)

3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.

I get an error when I execute ng build --prod. ng build works fine.

I've installed several angular2-material components. These are my current npm dependencies:

  "dependencies": {
    "@angular/common": "^2.0.0-rc.1",
    "@angular/compiler": "^2.0.0-rc.1",
    "@angular/core": "^2.0.0-rc.1",
    "@angular/http": "^2.0.0-rc.1",
    "@angular/platform-browser": "^2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "^2.0.0-rc.1",
    "@angular/router": "^2.0.0-rc.1",
    "@angular/router-deprecated": "^2.0.0-rc.1",
    "@angular/upgrade": "^2.0.0-rc.1",
    "@angular2-material/button": "^2.0.0-alpha.5-2",
    "@angular2-material/card": "^2.0.0-alpha.5-2",
    "@angular2-material/checkbox": "^2.0.0-alpha.5-2",
    "@angular2-material/core": "^2.0.0-alpha.5-2",
    "@angular2-material/grid-list": "^2.0.0-alpha.5-2",
    "@angular2-material/icon": "^2.0.0-alpha.5-2",
    "@angular2-material/input": "^2.0.0-alpha.5-2",
    "@angular2-material/list": "^2.0.0-alpha.5-2",
    "@angular2-material/sidenav": "^2.0.0-alpha.5-2",
    "@angular2-material/toolbar": "^2.0.0-alpha.5-2",
    "bootstrap": "^3.3.6",
    "cerialize": "^0.1.5",
    "es6-shim": "^0.35.0",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.6",
    "systemjs": "0.19.26",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
    "angular-cli": "1.0.0-beta.5",
    "codelyzer": "0.0.19",
    "ember-cli-inject-live-reload": "^1.4.0",
    "jasmine-core": "^2.4.1",
    "jasmine-spec-reporter": "^2.4.0",
    "karma": "^0.13.15",
    "karma-chrome-launcher": "^0.2.3",
    "karma-jasmine": "^0.3.8",
    "node-sass": "^3.7.0",
    "protractor": "^3.3.0",
    "ts-node": "^0.5.5",
    "tslint": "^3.6.0",
    "typescript": "^1.8.10",
    "typings": "^0.8.1"
  }

4. The log given by the failure. Normally this include a stack trace and some
more information.

When executing ng build --prod I get this error:

The Broccoli Plugin: [BundlePlugin] failed with:
Error on fetch for vendor/@angular2-material/toolbar/toolbar.js at file:///Users/cgcladera/Projects/ws-v4/webcastudio-wms/tmp/bundle_plugin-input_base_path-a9pZIXkD.tmp/0/vendor/@angular2-material/toolbar/toolbar.js
        Loading app/+console/console.component.js
        Loading app/webcastudio-wms.js
        Loading main.js
        Error: ENOENT: no such file or directory, open '/Users/cgcladera/Projects/ws-v4/webcastudio-wms/tmp/bundle_plugin-input_base_path-a9pZIXkD.tmp/0/vendor/@angular2-material/toolbar/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-OxHzApZr.tmp/0/components/toolbar/toolbar.js.map'
    at Error (native)

5. Mention any other details that might be useful.

I believe the problem is I started the project with pre-beta version of angular-cli. Actually, I create a brand new project installing some angular2-material component and it worked.
I've checked all angular-cli configuration files searching for any parameter I may have wrong but I found nothing different.

Most helpful comment

We see this error both in Mac and Ubuntu.

All 5 comments

It might be worth noting this is appearing also on Windows, but not on MAC (as far as I've tested).

Are there potentially some unix commands missing from Windows perhaps going on behind the scenes?

We see this error both in Mac and Ubuntu.

I believe this is a duplicate of https://github.com/angular/angular-cli/issues/940 - it's an issue (https://github.com/angular/material2/issues/541) with angular2-material that they're going to fix there.

Thanks @sphanley , I'm closing this issue then.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings