bluefox1688 / vue-cli-multi-page

因时间精力有限,项目已不再维护,请慎重使用,vue2-cli-vux2-multe-page,使用了webpack2+vuejs2+vuxUI2的多页面脚手架
827 stars 239 forks source link

cnpm i安装有一个失败,npm run dev 运行报错 #14

Open CCCpan opened 7 years ago

CCCpan commented 7 years ago

安装错误:[Error: Run "C:\windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallbac k-to-build" error, exit code 1

在安装包一个错误下运行报错:webpack.base.conf.js文件 let。。 吧let改成var就可以跑起来了, 但页面跑起来后TypeError: t.$t is not a function 页面总是抱着个错误

解决了我cli多页面2级页面的的需求,找了好久,谢谢楼主

bluefox1688 commented 7 years ago

直接使用 cnpm 可能会导致依赖不正确。强烈建议给 npm 设置 taobao 的 registry。 npm install --registry=https://registry.npm.taobao.org

如果你遇到 $t 报错问题,先删除 node_modules 再重装依赖。

CCCpan commented 7 years ago

谢谢大神回复,我再试一下你的方法 ,再求一个帮组,我对webpack,express不熟悉,捣鼓配置一直出错,楼主能不能出一个简洁版的架子 啊,不要测试啊什么的,就这些(现在不用这个,也用不来...),非常感谢 "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e"

CCCpan commented 7 years ago

都是睡不着的人~!~

bluefox1688 commented 7 years ago

这几个unit e2e test你不用就行了,不影响你构建的

alwaysloseall commented 7 years ago

我也遇到了这个问题 安装的时候会抛错 不知道是什么原因删掉node_modules 再重装就可以了 而且在一台电脑上 运行npm run dev就正常的,另一台电脑就会出现let关键字报错的情况 望解决

asvue commented 7 years ago

cnpm 说实话经常会下载失败,yarn设了淘宝源,也并没有好转,推荐每次cnpm i 后在npm i查找下有没有没下载的

CCCpan commented 7 years ago

新建文件夹必须要重新run dev么?

bluefox1688 commented 7 years ago

是的,新建页面必须要npm run dev

CCCpan commented 7 years ago

我引入import mui from 'assets/lib/mui/mui.min.js';
报错Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

网上说是严格模式,网上给的方法没能解决 请问这个怎么处理啊