下载了老师的项目源码,先npm install了,但是运行后还是报错了

来源:6-2 首页 - 信息列表 - 全部产品

啦啦啦啦啦啦啦啦123

2017-05-28

ERROR in ./src/main.js

Module build failed: Error: Cannot find module './lib/virtual-types' (While processing preset: "F:\\quick\\Myvue\\SalePlatform\\node_modules\\babel-preset-stage-2\\lib\\index.js")

    at Function.Module._resolveFilename (module.js:469:15)

    at Function.Module._load (module.js:417:25)

    at Module.require (module.js:497:17)

    at require (internal/module.js:20:19)

    at Object.<anonymous> (F:\quick\Myvue\SalePlatform\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\lib\path\index.js:13:21)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

    at Function.Module._load (module.js:438:3)

    at Module.require (module.js:497:17)

    at require (internal/module.js:20:19)

    at Object.<anonymous> (F:\quick\Myvue\SalePlatform\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\lib\index.js:10:13)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

 @ multi app


ERROR in ./build/dev-client.js

Module build failed: Error: Cannot find module './lib/virtual-types' (While processing preset: "F:\\quick\\Myvue\\SalePlatform\\node_modules\\babel-preset-stage-2\\lib\\index.js")

    at Function.Module._resolveFilename (module.js:469:15)

    at Function.Module._load (module.js:417:25)

    at Module.require (module.js:497:17)

    at require (internal/module.js:20:19)

    at Object.<anonymous> (F:\quick\Myvue\SalePlatform\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\lib\path\index.js:13:21)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

    at Function.Module._load (module.js:438:3)

    at Module.require (module.js:497:17)

    at require (internal/module.js:20:19)

    at Object.<anonymous> (F:\quick\Myvue\SalePlatform\node_modules\babel-preset-stage-2\node_modules\babel-preset-stage-3\node_modules\babel-plugin-transform-async-to-generator\node_modules\babel-helper-remap-async-to-generator\node_modules\babel-traverse\lib\index.js:10:13)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

 @ multi app

Child html-webpack-plugin for "index.html":

         Asset     Size  Chunks       Chunk Names

    index.html  1.47 MB       0

webpack: Failed to compile.


写回答

3回答

ahong977

2017-05-29

去群里问吧

1
0

慕仙1827196

2017-06-20

同样的问题+1

群里的大神并不愿意鸟我[捂脸]

可能问题太幼稚了吧?

0
1
fishenal
说实话这种问题多半就是环境问题,要么是其中某些库升级了版本不兼容,不去你电脑上调试很能猜测出到底是什么问题。 你这里主要就是babel-preset-stage-2 这里的依赖报错,babel是用于解析es6语法的,你检查一下代码里是不是有不规范的es6写法。 还有一种办法就是用vue-cli生成一套空项目看看有没有问题,再把我的代码一点一点粘进去,看到哪里会出错
2017-06-21
共1条回复

fishenal

2017-05-30

可能是babel相关的库没装上

0
0

最容易上手的Vue2.0入门实战教程

快速入门Vue2.0,组件化开发一个数字产品电商平台

3966 学习 · 999 问题

查看课程