Vue项目中的问题

问题

1、项目中报错,还加载不出来数据!

[vuex] module namespace not found in mapActions(): customer/
[Vue warn]: Error in created hook: "
TypeError: this.toLaodCustomer(…) isundefined"
TypeError: this.toLaodCustomer(…) is undefined
[vuex]module namespace not found in mapState(): customer/
[Vue warn]: Error in render: "TypeError: _vm.customerObj is undefined"

解决:

在仓库中的index.js导入customer之后,忘记在modules中设置;太崩溃了!

Vue项目中的问题_第1张图片

2、在项目启动时一直无法启动,而且install也没用

error in ./src/base/components/head.vue Module build failed:
Error: Node Sass does not yet support your current environment:
Windows 64-bit with Unsupported runtime (72) For more information on
which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2
at module.exports (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\binding.js:13:13)
at Object. (F:\teach\xcEdu\xcEduUI01\xc-ui-pc-sysmanage\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)

试过了,都没用

npm audit
npm audit  fix
npm audit  fix  --force

最后 更新了sass

npm install --save node-sass
或 cnpm install --save node-sass***

执行npm run dev就成功了
原因可能是sass不支持当前环境吧

你可能感兴趣的:(问题&解决方法,vue)