错误Gulp browserify require('material-design-lite')模块未找到

时间:2015-12-09 11:10:16

标签: npm gulp browserify material-design-lite

使用material-design-lite进行Browserify错误。我用npm material-design-lite和其他软件包安装。

const React = require('react');
const ReactDOM = require('react-dom');
const googleApiLoader = require('./GoogleAPILoader');
const MicroBarChart = require('react-micro-bar-chart');
//const mdl = require('./material.min.js');
const mdl = require('material-design-lite');

其他人需要完美的工作。所以我的解决方法是将material.min.js放在脚本目录中(如注释)。

[11:59:18] Starting 'copy'...

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: module "material-design-lite" not found from "D:\\MyAPP\\app\\scripts\\fake_2a2b1a27.js"
    at notFound (D:\countingit\node_modules\gulp-browserify\node_modules\browserify\index.js:803:15)
    at D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\index.js:754:23
    at D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\node_modules\browser-resolve\index.js:185:24
    at D:\countingit\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:44:14
    at process (D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:113:43)
    at D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:122:21
    at load (D:\countingit\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:54:43)
    at D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:60:22
    at D:\MyAPP\node_modules\gulp-browserify\node_modules\browserify\node_modules\resolve\lib\async.js:16:47

0 个答案:

没有答案