ERROR
文章平均质量分 61
面向Web3,春暖花开
这个作者很懒,什么都没留下…
展开
-
VUE报错:Uncaught SyntaxError: Unexpected token ‘<‘
报错起因将Vue 路由 设为 history 模式后打包, 首页访问没有任何问题,跳转到子路由 /apollo/search/ 也没有问题,但刷新子路由 /apollo/search/ 就会报错:Uncaught SyntaxError: Unexpected token '<'查询过程刚开始以为是 js 打包发布过程中导致的 js 缺失,重新打包发布仍然出现问题,排除此因。查询后端 nginx 设置是否有问题,询问后端没有问题,排除后端原因最后查看报错 js 的路径,恍然大悟,正确的路径原创 2022-02-14 17:23:36 · 3504 阅读 · 2 评论 -
You may have an infinite update loop in a component render function.
1. 报错代码<ul> <li v-for="(item, i) in rankList" :key="item.ID" > <sparklineBar :data="item.priceList.reverse()" :limit="item.priceList.length" /> </li></ul>运行上述代码时,vue报错:You may have an原创 2021-03-22 17:38:11 · 5469 阅读 · 0 评论 -
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x
因为最近升级了node,所以运行Vue项目 npm run serve 的时候报如下错误:error in ./node_modules/vue-loading-spinner/src/components/RotateSquare5.vue?vue&type=style&index=0&id=fa2cf838&lang=scss&scoped=true&Module build failed (from ./node_modules/sass-loa原创 2020-11-10 11:55:26 · 3041 阅读 · 1 评论 -
vue-resource解决Provisional headers are shown问题
前情提要用 vue-resource post请求数据时一直报跨域错误:has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.由于项目紧急所以改换 axios 请求,没有报任何错误,并且成功返回结果 。原原创 2020-07-13 14:24:48 · 5407 阅读 · 0 评论 -
vue 编译 ... 扩展运算符时报错 Syntax Error: Unexpected token 的解决方法
引言今天用 vue-cli2.x 写项目时用到了对象的扩展运算符 ... , 在运行项目时报错,我的项目中用到的 babel 是 6.26.3 版本;而且已有如下依赖{ "babel-core": "^6.26.3", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.5", "ba...原创 2019-09-18 09:34:00 · 10697 阅读 · 3 评论 -
npm报错 gyp: No Xcode or CLT version detected!
报错:No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'....原创 2020-03-04 16:56:02 · 4144 阅读 · 1 评论 -
Uncaught TypeError: Cannot assign to read only property 'exports' of object
1. 错误:vue 运行时报错:Cannot assign to read only property 'exports' of object '#<Object>'2. 解决过程:搜索一些方法都是在说 webpack 同一个文件 不可以用 import 引入然后再用 module.exports 输出,只能用 export 输出weeks.jsmodule.export...原创 2019-12-20 17:18:21 · 2621 阅读 · 4 评论 -
vue打包时报错 Error: No PostCSS Config found in 的解决方法
vue 项目打包时报了如下错误:Error: No PostCSS Config found in...没有postCss配置因此添加一个postcss.config.js文件放在根目录下postcss-loader是为了兼容css3,自动给css添加前缀的webpack插件module.exports = { plugins: { 'autoprefixer': { b...原创 2019-10-09 10:06:03 · 2588 阅读 · 0 评论 -
Module build failed: Error: Cannot find module 'node-sass’
在 vue 项目打包时报了Module build failed: Error: Cannot find module 'node-sass’这个错误,于是下载node-sass依赖npm install node-sass --save-dev结果还是报错然后百度说通过淘宝镜像下载即可,然后配置淘宝镜像npm install -g cnpm --registry=https://r...原创 2019-10-09 10:03:15 · 1929 阅读 · 1 评论 -
Module build failed: SyntaxError: Unexpected token
1.vue router 按需加载时报错写法:{ path: '/product', component: () => import('./pages/product'),},运行时报错:Module build failed: SyntaxError: Unexpected token解决方法:...原创 2019-09-05 11:47:13 · 7593 阅读 · 0 评论