1. Cloned https://github.com/google/material-design-lite
  2. Install all dependencies with the npm install command
  3. I collect the project team gulp

But I get this answer:

 [07:30:45] Failed to load external module babel-register [07:30:45] Requiring external module babel-core/register [07:30:52] Using gulpfile D:\cms\admin\vendor\material-design-lite\gulpfile.babel.js [07:30:52] Starting 'clean'... [07:30:52] Finished 'clean' after 16 ms [07:30:52] Starting 'default'... [07:30:52] Starting 'styles'... [07:30:53] Starting 'styles-grid'... [07:30:55] styles-grid all files 18.82 kB [07:30:55] Finished 'styles-grid' after 1.52 s [07:30:57] styles all files 853.19 kB [07:30:57] Finished 'styles' after 4.22 s [07:30:57] Starting 'lint'... validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\mdlComponentHandler.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |/** 18 | * A component handler interface using the revealing module design pattern. 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\animation\demo.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |/** 18 | * Class constructor for Animation MDL component. 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\button\button.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\checkbox\checkbox.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\data-table\data-table.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\icon-toggle\icon-toggle.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\layout\layout.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\menu\menu.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\progress\progress.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\radio\radio.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\ripple\ripple.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\slider\slider.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\snackbar\snackbar.js : 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -----------^ 16 |(function() { 17 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\spinner\spinner.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\switch\switch.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\tabs\tabs.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\textfield\textfield.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\third_party\rAF.js : 1 |// Source: https://github.com/darius/requestAnimationFrame/blob/master/requestAnimationFrame.js -------------------------------------------------------------------------------------------------------^ 2 |// Adapted from https://gist.github.com/paulirish/1579671 which derived from 3 |// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\src\tooltip\tooltip.js : 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -----------^ 17 |(function() { 18 | 'use strict'; 1 code style error found. validateLineBreaks: Invalid line break at D:\cms\admin\vendor\material-design-lite\gulpfile.babel.js : 16 | * limitations under the License 17 | * 18 | */ -----------^ 19 | 20 |// jscs:disable jsDoc 1 code style error found. [07:31:00] 'lint' errored after 3.78 s [07:31:00] Error in plugin 'gulp-jscs' Message: JSCS failed for: D:\cms\admin\vendor\material-design-lite\src\mdlComponentHandler.js, D:\cms\admin\vendor\material-design-lite\src\animation\demo.js, D:\cms\admin\vendor\material-design-lite\src\button\button.js, D:\cms\admin\vendor\material-design-lite\src\checkbox\checkbox.js, D:\cms\admin\vendor\material-design-lite\src\data-table\data-table.js, D:\cms\admin\vendor\material-design-lite\src\icon-toggle\icon-toggle.js, D:\cms\admin\vendor\material-design-lite\src\layout\layout.js, D:\cms\admin\vendor\material-design-lite\src\menu\menu.js, D:\cms\admin\vendor\material-design-lite\src\progress\progress.js, D:\cms\admin\vendor\material-design-lite\src\radio\radio.js, D:\cms\admin\vendor\material-design-lite\src\ripple\ripple.js, D:\cms\admin\vendor\material-design-lite\src\slider\slider.js, D:\cms\admin\vendor\material-design-lite\src\snackbar\snackbar.js, D:\cms\admin\vendor\material-design-lite\src\spinner\spinner.js, D:\cms\admin\vendor\material-design-lite\src\switch\switch.js, D:\cms\admin\vendor\material-design-lite\src\tabs\tabs.js, D:\cms\admin\vendor\material-design-lite\src\textfield\textfield.js, D:\cms\admin\vendor\material-design-lite\src\third_party\rAF.js, D:\cms\admin\vendor\material-design-lite\src\tooltip\tooltip.js, D:\cms\admin\vendor\material-design-lite\gulpfile.babel.js [07:31:00] 'default' errored after 8.05 s [07:31:00] Error in plugin 'run-sequence(lint)' Message: JSCS failed for: D:\cms\admin\vendor\material-design-lite\src\mdlComponentHandler.js, D:\cms\admin\vendor\material-design-lite\src\animation\demo.js, D:\cms\admin\vendor\material-design-lite\src\button\button.js, D:\cms\admin\vendor\material-design-lite\src\checkbox\checkbox.js, D:\cms\admin\vendor\material-design-lite\src\data-table\data-table.js, D:\cms\admin\vendor\material-design-lite\src\icon-toggle\icon-toggle.js, D:\cms\admin\vendor\material-design-lite\src\layout\layout.js, D:\cms\admin\vendor\material-design-lite\src\menu\menu.js, D:\cms\admin\vendor\material-design-lite\src\progress\progress.js, D:\cms\admin\vendor\material-design-lite\src\radio\radio.js, D:\cms\admin\vendor\material-design-lite\src\ripple\ripple.js, D:\cms\admin\vendor\material-design-lite\src\slider\slider.js, D:\cms\admin\vendor\material-design-lite\src\snackbar\snackbar.js, D:\cms\admin\vendor\material-design-lite\src\spinner\spinner.js, D:\cms\admin\vendor\material-design-lite\src\switch\switch.js, D:\cms\admin\vendor\material-design-lite\src\tabs\tabs.js, D:\cms\admin\vendor\material-design-lite\src\textfield\textfield.js, D:\cms\admin\vendor\material-design-lite\src\third_party\rAF.js, D:\cms\admin\vendor\material-design-lite\src\tooltip\tooltip.js, D:\cms\admin\vendor\material-design-lite\gulpfile.babel.js Stack: at finish (D:\cms\admin\vendor\material-design-lite\node_modules\run-sequence\index.js:56:13) at Gulp.onError (D:\cms\admin\vendor\material-design-lite\node_modules\run-sequence\index.js:67:4) at emitOne (events.js:82:20) at Gulp.emit (events.js:169:7) at Gulp.Orchestrator._emitTaskDone (D:\cms\admin\vendor\material-design-lite\node_modules\gulp\node_modules\orchestrator\index.js:264:8) at D:\cms\admin\vendor\material-design-lite\node_modules\gulp\node_modules\orchestrator\index.js:275:23 at finish (D:\cms\admin\vendor\material-design-lite\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:21:8) at DestroyableTransform.<anonymous> (D:\cms\admin\vendor\material-design-lite\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:52:4) at DestroyableTransform.f (D:\cms\admin\vendor\material-design-lite\node_modules\gulp\node_modules\orchestrator\node_modules\end-of-stream\node_modules\once\once.js:17:25) at emitOne (events.js:82:20) 

I work with babel for the first time, so I thought that there are no corresponding dependencies, I checked the node_modules in it have babel-core and babel-present-es2015 .

Tell me what's the matter?

  • Ivan, below wrote a possible solution - try it. If you do not solve the problem - write, what mistakes still occur. It is also important that when installing dependencies, all packages are delivered correctly. - Alexander Bragin

1 answer 1

The point is in the end of the lines, because you are working in Windows. When you execute gulp , lint JavaScript files occur, that is, search for errors and check for compliance of files with code design standards.

After you clone repos using Git

 git clone https://github.com/google/material-design-lite.git 

In the project directory you need to run the commands.

Windows users, if you have problems compiling because of the end of a line, make sure you set up git to check the repository with the end of the lf (unix) line. This can be achieved by setting core.eol .

 git config core.eol lf git config core.autocrlf input git rm --cached -r . git reset --hard 

Instructions on this are also in the repository itself - Download / Clone .


Cloning and installing dependencies

If after cloning the repository, errors occur during the installation of the npm install dependencies, for example, due to a slow Internet connection, some packages did not download completely properly - in most cases it is enough to re-run this command (maybe even several times).