angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.23k stars 6.7k forks source link

got error - build Material in dev mode #13123

Closed paullauyc closed 5 years ago

paullauyc commented 5 years ago

Bug, feature request, or proposal:

Buliding material2 package error. The Error detail as below:

screenshot 2018-09-14 19 42 59

What is the expected behavior?

What is the current behavior?

What are the steps to reproduce?

$ gulp material:build
[19:30:37] Using gulpfile ~/Documents/NgProjects/angular-material2/gulpfile.js
[19:30:37] Starting 'material:build'...
[19:30:37] Starting 'cdk:build'...
[19:30:37] Starting 'cdk:assets:scss'...
[19:30:37] Starting 'cdk:assets:es5-scss'...
[19:30:37] Starting 'cdk:assets:copy-styles'...
[19:30:37] Starting 'cdk:assets:html'...
[19:30:37] Finished 'cdk:assets:html' after 58 ms
[19:30:38] Finished 'cdk:assets:es5-scss' after 164 ms
[19:30:38] Finished 'cdk:assets:scss' after 177 ms
[19:30:38] Finished 'cdk:assets:copy-styles' after 165 ms
[19:30:38] Starting 'cdk:assets'...
[19:30:38] Finished 'cdk:assets' after 42 μs
[19:30:38] Starting 'cdk:build:esm'...
[19:31:30] Finished 'cdk:build:esm' after 53 s
[19:31:30] Starting 'cdk:assets:inline'...
[19:31:31] Finished 'cdk:assets:inline' after 221 ms
[19:31:31] Starting 'cdk:build:bundles'...
[19:31:38] Finished 'cdk:build:bundles' after 7.14 s
[19:31:38] Finished 'cdk:build' after 1 min
[19:31:38] Starting 'material:assets:scss'...
[19:31:38] Starting 'material:assets:es5-scss'...
[19:31:38] Starting 'material:assets:copy-styles'...
[19:31:38] Starting 'material:assets:html'...
[19:31:39] Finished 'material:assets:html' after 829 ms
[19:31:39] Finished 'material:assets:copy-styles' after 932 ms
[19:31:40] Finished 'material:assets:scss' after 2.23 s
[19:31:40] Finished 'material:assets:es5-scss' after 2.35 s
[19:31:40] Starting 'material:assets'...
[19:31:40] Finished 'material:assets' after 2.76 μs
[19:31:40] Starting 'material:build:esm'...
datetime/date-selection.ts(9,27): error TS2307: Cannot find module '@angular/material/core'.

Failed to compile core using /Users/paullau/Documents/NgProjects/angular-material2/src/lib/core/tsconfig-build.json
[19:31:44] 'material:build:esm' errored after 3.65 s
[19:31:44] Error: Failed to compile core using /Users/paullau/Documents/NgProjects/angular-material2/src/lib/core/tsconfig-build.json
    at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
    at emitOne (events.js:121:20)
    at Gulp.emit (events.js:211:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/index.js:264:8)
    at /Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/index.js:275:23
    at finish (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/lib/runTask.js:45:4
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[19:31:44] 'material:build' errored after 1.1 min
[19:31:44] Error in plugin 'run-sequence(material:build:esm)'
Message:
    Failed to compile core using /Users/paullau/Documents/NgProjects/angular-material2/src/lib/core/tsconfig-build.json
Stack:
    at finish (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/run-sequence/index.js:56:13)
    at Gulp.onError (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/run-sequence/index.js:67:4)
    at emitOne (events.js:121:20)
    at Gulp.emit (events.js:211:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/index.js:264:8)
    at /Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/index.js:275:23
    at finish (/Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/paullau/Documents/NgProjects/angular-material2/node_modules/orchestrator/lib/runTask.js:45:4
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Operating System  :  high Sierria
Material version : 6.4.7
node version : v8.11.2
gulp : CLI version 3.9.1
             Local version 3.9.1

Is there anything else we should know?

paullauyc commented 5 years ago

After I modified the src/lib/core/datetime/date-selection.ts. Now I can build the release on the current 6.4.x verison. The code shown as below ... pls comment. thanks!

/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

// import {DateAdapter} from '@angular/material/core'; // <- Before
import {DateAdapter} from './date-adapter'; // <- Changed 
import {Subject} from 'rxjs';
jelbourn commented 5 years ago

@paullauyc thanks, feel free to send a PR. this came from a merge conflict when cherrypicking changes into the patch branch, and it sounds like to figured it out before we got a chance to investigate

angular-automatic-lock-bot[bot] commented 4 years ago

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.