ElemeFE / vue-desktop

A UI library for building admin panel website.
548 stars 99 forks source link

npm run build error #27

Closed vxzhong closed 8 years ago

vxzhong commented 8 years ago
  1. git clone https://github.com/ElemeFE/vue-desktop.git
  2. cnpm install
  3. npm run build

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./examples/basic/progress-bar.vue Module build failed: TypeError: /Users/zhangzhong/Github/vue-desktop/examples/basic/progress-bar.vue: Cannot read property 'indexOf' of undefined at Object.relative (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/node_modules/source-map/lib/util.js:206:17) at SourceMapConsumer_generatedPositionFor as generatedPositionFor at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:445:53 at Array.forEach (native) at SourceMapConsumer_eachMapping as eachMapping at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:444:26 at File.mergeSourceMap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:469:9) at File.generate (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:663:25) at File.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:510:17) at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:46:19 at File.wrap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:520:16) at Pipeline.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:43:17) at transpile (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:88:12) @ ./examples/basic/progress-bar.vue 2:17-122

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./examples/basic/sticky.vue Module build failed: TypeError: /Users/zhangzhong/Github/vue-desktop/examples/basic/sticky.vue: Cannot read property 'indexOf' of undefined at Object.relative (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/node_modules/source-map/lib/util.js:206:17) at SourceMapConsumer_generatedPositionFor as generatedPositionFor at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:445:53 at Array.forEach (native) at SourceMapConsumer_eachMapping as eachMapping at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:444:26 at File.mergeSourceMap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:469:9) at File.generate (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:663:25) at File.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:510:17) at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:46:19 at File.wrap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:520:16) at Pipeline.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:43:17) at transpile (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:88:12) @ ./examples/basic/sticky.vue 3:17-116

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./examples/nav/accordion.vue Module build failed: TypeError: /Users/zhangzhong/Github/vue-desktop/examples/nav/accordion.vue: Cannot read property 'indexOf' of undefined at Object.relative (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/node_modules/source-map/lib/util.js:206:17) at SourceMapConsumer_generatedPositionFor as generatedPositionFor at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:445:53 at Array.forEach (native) at SourceMapConsumer_eachMapping as eachMapping at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:444:26 at File.mergeSourceMap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:469:9) at File.generate (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:663:25) at File.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:510:17) at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:46:19 at File.wrap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:520:16) at Pipeline.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:43:17) at transpile (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:88:12) @ ./examples/nav/accordion.vue 2:17-119

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./examples/nav/breadcrumb.vue Module build failed: TypeError: /Users/zhangzhong/Github/vue-desktop/examples/nav/breadcrumb.vue: Cannot read property 'indexOf' of undefined at Object.relative (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/node_modules/source-map/lib/util.js:206:17) at SourceMapConsumer_generatedPositionFor as generatedPositionFor at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:445:53 at Array.forEach (native) at SourceMapConsumer_eachMapping as eachMapping at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:444:26 at File.mergeSourceMap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:469:9) at File.generate (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:663:25) at File.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:510:17) at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:46:19 at File.wrap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:520:16) at Pipeline.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:43:17) at transpile (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:88:12) @ ./examples/nav/breadcrumb.vue 2:17-120

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/nav/breadcrumb.vue Module build failed: TypeError: /Users/zhangzhong/Github/vue-desktop/src/nav/breadcrumb.vue: Cannot read property 'indexOf' of undefined at Object.relative (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/node_modules/source-map/lib/util.js:206:17) at SourceMapConsumer_generatedPositionFor as generatedPositionFor at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:445:53 at Array.forEach (native) at SourceMapConsumer_eachMapping as eachMapping at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:444:26 at File.mergeSourceMap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:469:9) at File.generate (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:663:25) at File.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:510:17) at /Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:46:19 at File.wrap (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/file/index.js:520:16) at Pipeline.transform (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-core/lib/transformation/pipeline.js:43:17) at transpile (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:14:22) at Object.module.exports (/Users/zhangzhong/Github/vue-desktop/node_modules/babel-loader/index.js:88:12) @ ./src/nav/breadcrumb.vue 3:17-120

ERROR in ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./src/form/time-picker.vue Module build failed: @ ./src/form/time-picker.vue 4:19-135

furybean commented 8 years ago

Hi, 把 vue-loader 的版本指定为 7.3.0 就可以解决这个问题。

npm install vue-loader@7.3.0 --save
npm run dev