
遇到的问题
woowen!
这个作者很懒,什么都没留下…
展开
-
浏览器控制台报错:Cross origin requests are only supported for protocol schemes
安装好后,切换到index.html 所在的文件夹,运行 anywhere。使用anywhere(静态文件服务器),可以使用npm 安装。vue项目打包后,想要访问index.html。安装好后,右键要打开的文件,就会出现“主要就是本地file文件反问提示跨域。Live Server插件。翻译 2023-03-31 16:22:02 · 728 阅读 · 0 评论 -
yarn install 提示:The unauthenticated git protocol on port 9418 is no longer supported.
问题复现场景----下载依赖包 yarn install 时提示:The unauthenticated git protocol on port 9418 is no longer supported.问题:git config --global url."https://".insteadOf git://fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support问题.转载 2022-03-25 16:50:15 · 5017 阅读 · 3 评论 -
Node Sass does not yet support your current environment: OS X 64-bit wit
安装node_modules后,编译项目提示:当前环境不支持Node Sass解决办法两种:一种方法从node sass上入手,另一种方法从node版本上入手1.在当前环境重新下载一遍node sass先卸载node sass npmuninstall--savenode-sass 再安装 npm install --save node-sass (cnpm install --save node-sass ) 上面方法1行不通的话...原创 2022-03-18 15:16:33 · 601 阅读 · 0 评论 -
jenkins 构建提示 Error: EACCES: permission denied
ERROR Error: EACCES: permission denied, unlink '/var/jenkins_home/workspace/uat-risk-static/dist/023965f43a24e8ea5c2f.worker.js'Error: EACCES: permission denied, unlink '/var/jenkins_home/workspace/uat-risk-static/dist/023965f43a24e8ea5c2f.worker.js'npm.原创 2021-12-31 13:16:21 · 4850 阅读 · 0 评论 -
vue脚手架项目报: DevTools failed to load source map 开发者工具加载 source map 失败
控制台警报:DevTools failed to load source map: Could not load content for原创 2021-12-13 16:07:09 · 4643 阅读 · 5 评论 -
微信小程序 magic bug~ 不清除token而是选择替换token,wx.getStorageSync会取值旧token值,而不是新token值
微信小程序 如果token不清除,则取之取得是上一次的token????what这是为什么?用户每次登录时都会改变token值但如果在登录时,没有清除token,而是替换为新的token,则跳转到小程序之外的网页时,取值token会是上一次的token!!!这是啥情况// 审批进度import api from '../../apis/api'import config from './../../config/config'Page({ data: { env:原创 2021-11-09 16:06:07 · 1318 阅读 · 2 评论 -
彻底删除/清除node_modules目录
1. npm cache clean --force // 清除npm缓存2. rm -rf node_modules /或者手动删除node_modules目录 // 删除node_modules文件目录3. 删除package-lock.json4. npm install/yarn install5. npm run start原创 2021-07-28 11:43:27 · 11824 阅读 · 0 评论 -
vue项目启动报错:Support for the experimental syntax ‘jsx‘ isn‘t currently enabled
根据图中红色框中的提示语:大致意思就是需要你在.babelrc配置文件中 添加@vue/babel-preset-jsx即可步骤一:原创 2021-07-02 18:09:15 · 21504 阅读 · 15 评论 -
vue项目启动报错提示:Support for the experimental syntax ‘classProperties‘ isn‘t currently enable
EventBus事件总线的使用方式:原创 2021-07-02 17:55:04 · 716 阅读 · 0 评论 -
微信小程序 window.btoa对象 图形验证码base64格式 responseType:arraybuffer类型
1.微信小程序支持responseType:arraybuffer类型 转base64字符串2.浏览器支持responseType:arraybuffer类型 转base64字符串1.微信小程序支持responseType:arraybuffer类型 转base64字符串因微信小程序中不支持window对象,所以在这里bota方法就不可用如何破?微信小程序:登录页面 图形验证码的获取因这里调用的后端接口要求responseType的类型是:‘arraybuffer’,通过wx.array原创 2021-06-01 16:47:02 · 2184 阅读 · 5 评论 -
vue.runtime.esm.js Uncaught TypeError: Illegal constructor 错误
报如下错误:Uncaught TypeError: Illegal constructorvue+elementUI 项目本人项目中错将“Element”变量放入vue.use()中导致报如上错误在main.js中安装 Vue.js 插件的方法,大家可以查看下自己在使用这个vue.use()方法时,变量名字是否使用错误// main.jsimport ElementUI from 'element-ui'Vue.use(ElementUI)...原创 2021-04-07 11:51:13 · 4377 阅读 · 3 评论 -
vue-cli 启动报错信息为getaddrinfo ENOTFOUND localhost
经查,发现package.json中dev的脚本变成了"webpack-dev-server --inline --host 0.0.0.0 --progress --config build/webpack.dev.conf.js",使用了webpack-dev-server出现此问题是因为webpack-dev-server启动时要指定ip,不能直接通过localhost启动,解决方法:修改config/index.js下dev配置中的host为ip:127.0.0.1(注意这里不能写成ht.转载 2020-07-30 09:46:08 · 991 阅读 · 0 评论 -
解决Cannot read property call of undefined
Uncaught TypeError: Cannot read property ‘call’ of undefinedhttps://robinchen.me/tech/2016/10/25/tech-A-case-of-ES6-modules.html原创 2020-07-22 22:40:03 · 5459 阅读 · 0 评论 -
Module build failed (from ./node_modules/babel-loader/lib/index.js) babel-loader
解决问题:npm install -D babel-loader @babel/core @babel/preset-env webpack参考链接:https://github.com/babel/babel/issues/8599原创 2020-06-28 16:48:03 · 3687 阅读 · 0 评论 -
nginx报::ERR_CONTENT_LENGTH_MISMATCH错误解决-及如何配置日志
nginx启动服务在地址栏输入localhost:8080,console控制台报如下错误:为解决上述问题,我们第一步需要做的事情就是知道:如何为nginx配置和读取日志?只有第一步完成了,在发现问题后第一时间从错误日志入手,才可以做到事半功倍Nginx用两种类型的日志记录其事件记录:访问日志和错误日志。访问日志记录有关客户端请求的信息,错误日志记录有关服务器和应用程序问题的信息。配置访问日志:待续…配置错误日志:Nginx将有关应用程序和常规服务器错误的消息写入错误日志文件。如果你原创 2020-06-27 10:19:18 · 1791 阅读 · 0 评论 -
react-router如何配置可选参数
以下为转载:在react-router 2.0中可选参数是这样写的<Route path='/index(/:hello)' />而在react-4.0中你会惊喜的发现这种写法没用了,要写成这样:<Route path='/index/:hello?' />后边的问号表示这个参数是可选的转载链接:https://blog.youkuaiyun.com/qq_40949386/article/details/80469431...转载 2020-07-22 22:47:09 · 2625 阅读 · 0 评论 -
http-proxy-middleware手动配置代理解决跨域问题
https://www.jianshu.com/p/ac23664982b2原创 2020-06-20 21:45:51 · 1983 阅读 · 1 评论 -
h5调起相机并实现预览input file类型+ FileReader
h5调起相机并实现预览https://stackoverflow.com/questions/32508191/uncaught-typeerror-failed-to-execute-readasdataurl-on-filereader-parameter直接上代码:.m-upload{ width: 100%; position: relative; .cameraInput{ opacity: 0;//隐藏input width: 100原创 2020-06-16 22:24:49 · 452 阅读 · 0 评论 -
There are multiple modules with names that only differ in casing--有多个模块的名称仅在大小写上有所不同
问题:解决链接:https://stackoverflow.com/questions/47534267/webpack-there-are-multiple-modules-with-names-that-only-differ-in-casing-but这通常是微小错字的结果。可能是你引入某个文件的大小写写错了,例如是上面的Config.js文件,你命名的是大写的Config结果在引入这个模块的时候,确写成了小写的config.js导致成上面图片的警告⚠️ import config原创 2020-06-10 17:03:29 · 775 阅读 · 0 评论 -
npm ERR! code ELIFECYCLE解决方案
https://stackoverflow.com/questions/42308879/npm-err-code-elifecyclerm -rf node_modules && rm ./package-lock.json && npm install原创 2020-06-05 21:46:52 · 4401 阅读 · 0 评论 -
启动报错:Cannot find module resolve
2020-5-27 周三npm run start,提示:Error: Cannot find module ‘resolve’应该跟你下载的包的方式有问题,我解决方案是将:node_modules整个目录删除,然后重新npm install ,再启动后就没有这个问题复现了。。...原创 2020-06-04 22:04:35 · 4590 阅读 · 4 评论 -
npm install fails with pngquant failed to build, make sure that libpng is installed
npm insatll时提示:pngquant failed to build, make sure that libpng is installed解决方法:npm install imagemin-pngquant@5.0.1 --savenpm install pngquant-bin@3.1.1 --save或者:npm i -D imagemin-pngquant@5.0.1原链接原创 2020-06-04 22:01:12 · 8038 阅读 · 1 评论 -
启动react项目提示:Module build failed: SyntaxError: Unexpected token
启动react项目时提示:Module build failed: SyntaxError: Unexpected token (18:4)解决方法:添加 .babelrc文件:{ "presets": [ ["es2016"], "react" ], "plugins": [ "babel-plugin-transform-class-properties" ]}也可以查看链接:https://github.com/JeffreyWay/larave原创 2020-06-03 09:49:47 · 2689 阅读 · 2 评论 -
mock+express+proxy(解决跨域)实现动态模拟接口数据
Express 高度包容·快速·极简的 Node.js web框架Mockjs 生成随机数据,拦截Ajax请求安装express,mockjs新建mock目录(与src同级)新建MockServer.js,实现简单的express web 服务启动express服务webpack-dev-server配置proxy//--save会把依赖包名称添加到package.json文件dependencies下//--save-dev 则添加到package.json文件devDependenc原创 2020-06-02 22:31:38 · 1209 阅读 · 0 评论 -
【转】理解JavaScript 执行机制及异步回调(setTimeout/setInterval/Promise)
此处为转载,感谢作者分享!不论你是javascript新手还是老鸟,不论是面试求职,还是日常开发工作,我们经常会遇到这样的情况:给定的几行代码,我们需要知道其输出内容和顺序。因为javascript是一门单线程语言,所以我们可以得出结论:javascript是按照语句出现的顺序执行的看到这里读者要打人了:我难道...转载 2018-08-16 10:27:01 · 422 阅读 · 0 评论 -
页面使用overflow-scroll在iOS上滑动卡顿的问题
页面使用overflow-scroll在iOS上滑动卡顿的问题出处:因在做一个滑动的list列表,为某个div使用了overflow: scroll属性。结果在手机上测试时,ios手机有明显的滑动卡顿问题,而安卓手机不会出现该现象。经在网上查阅后,得知:以下代码可解决这种卡顿的问题:-webkit-overflow-scrolling: touch; 记录问题,但...转载 2018-05-30 21:34:54 · 805 阅读 · 0 评论