问题: vue 项目npm run dev运行时报错,如下图:  原因: 缺少相应的组件 解决办法: 安装相应组件: npm install babel-plugin-syntax-jsx --save-dev 安装完成再次执行npm run dev…
问题: vue项目npm run dev运行时报错,如下图:  原因: 缺少组件 解决办法: 安装相应的组件:  npm install babel-plugin-transform-vue-jsx --save-dev 然后再次运行:npm run dev…
运行npm run eject报错解决方法 主要问题是脚手架添加.gitgnore文件,但是却没有本地仓库,使用以下命令操作以下就可以了 git init git add . git commit -m 'saveing befor ejecting' 最后 npm run eject y 就解决了!…
问题描述 vue-electron 使用sqlite3数据库,执行npm run build 报错如下: .NET Framework 2.0 SDK,Microsoft Visual Studio 2005[C:\temp\wechat\node_modules\sqlite3\build\binding.sln]Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\nod…
遇到了执行npm run build 后报错: [build:js ] Module not found: Error: Can't resolve 'scss-loader' in 'D:\works\works\H5-IM\im-h5\src\pages' 在webpack.config.js里面加: test: /\.vue$/, loader: 'vue-loader', options: { autoprefixer: false, loaders: { scss: 'vue-styl…
目前代码所处位置是micro分支,该分支是从dev分支直接拉下来进行npm run dev的,而dev分支是可以正常运行的,网上的诸多解释是babel转义时候报错,其实对比可见,两个分支不同的地方应该是node_moduels依赖,所以解决方案就是:将micro分支的依赖删除重新install. 然而事实并非想象的那么简单,昨天进行了node_modules的删除重新install后,问题仍然没有解决,后来在本地重新建立了新的文件夹,git clone远程仓库代码,进行install依赖之后,开…
出错情况,如下图: 报错原因: listen EADDRINUSE :::8002 意思是当前8002端口被占用 解决办法: 一:简单粗暴:关掉可能影响的相关程序,重新执行启动. 二: 1.Win+R,cmd查询使用的端口号是否被占用: 输入命令:netstat -aon|findstr "8002" 按回车显示占用8080端口对应的程序的PID号:如下图: 2.根据PID号找到对应的程序: 输入命令:tasklist|findstr "12452" 按回车后显示出…
npm config set registry http://registry.cnpmjs.org try again npm run build 居然能动了....…
使用 git 提交一次记录即可正常 git add . git commit -m 'init' npm run eject…
转载自:https://www.jianshu.com/p/3f8f60e01797 运行npm run build打包时,报错如下:   我的package.json如下: { ... "devDependencies": { "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-eslint": "^8.2.1&…
问题: 1.在vue项目中,build打包后,index页面打开会报错, MIME type ('text/html') ;报错内容:because its MIME type ('text/html') is not a supported stylesheet MIME type2.控制台报错:报错内容:http://127.0.0.1:5500/static/css/app.04f46711e76646577281177c721d6432.css 这个地址Cannot GET 解决思路:…
webpack npm run dev 不能通过ip访问 只能通过localhost访问 解决方法如下: 修改vue-cli: config/index.js 文件 把文件中 host 的值,改成 ip 即可…
touch run.dev.logchmod u+w run.dev.log 记录日志文件 nohup npm run dev > run.dev.log 2>run.dev.log & exit 一定要控制台执行exit 不记录日志 nohup npm run dev >/dev/null 2>&1 & exit 结束持久npm run dev 查看端口号8080 杀死进程 kill -9 9071…
解决方法: 先 git add . 然后 git commit -m ‘init’ 然后再npm run eject…
在npm install的时候会报错,经过上网查阅资料之后,解决方法如下: 0.先升级npm版本:npm install -g npm   有可能是npm版本过低报错 1.然后清理缓存: npm cache clean --force  可能会有之前遗留代码会产生影响,所以先清理缓存 2.再执行 npm config set registry http://registry.cnpmjs.org 3.再执行 npm install 或者直接执行: 0.先升级npm版本:npm install -…
今天在学习tslint的时候,按照git clone下angular2-webpack-starter的代码执行npm run lint时,虽然代码进行了检测,但检测完成后npm始终报错, //package.json 报错的配置 "scripts": { "lint": "tslint \"src/**/*.ts\"", }, //返回的错误 npm ERR! Windows_NT 6.1.7601 npm ERR! arg…
系统 环境 vue   nginx 步骤 1.打包vue项目 2.配置nginx 打包vue项目 1.项目配置   我们使用服务器的8000端口 2.打包 # npm run build 打包成功会创建dist目录 3.上传到服务器 配置nginx 1.进入nginx 2.复制默认的配置文件default.conf  -> fengtaoconf # cp  default.conf fengtao.conf # vim fengtao.conf   修改端口 和 路径 3.有的服务器还需控制台…
自己做的一个Vue项目,在打包时老是报这个错误 # Error in parsing SVG: Unquoted attribute value 查了查网上说的,都说报错原因是压缩和抽离CSS的插件中只允许 SVG 使用双引号 就是项目中外部引入的CSS文件里的SVG只能是双引号 我找了好久,这可把我坑坏了... 想想那段时间真是难受... 后来我找到了,分享一下,让大家快点脱坑... 首先,如果你项目中使用了mui的话应该在这里改 找到mui文件下的iconfont.css文件 # mui/c…
具体报错如下图: 环境:centos7 应该node_modules安装问题,我们需要重新安装 rm -rf node_modules rm package-lock.json npm cache clear --force npm install 最后再npm run build 成功后的截图:…
昨天一个Vue项目打包后,今天测试,发现无论localhost还是服务器上都运行不了,报错如下: Failed to load resource: the server responded with a status of 400 (Bad Request) 网上搜索一圈,牛头不对马嘴的居多,向一前辈请教后,问题迎刃而解,现将方法分享如下: 其实超级简单!超级简单!超级简单!重要是事情说三遍,只需----------> 找到node_modules/@vue/cli-service/lib/op…
在做项目时,引用mui报错如下 看样子就是不支持严格模式吧. 解决方法是在根目录 下的.babelrc文件里面添加过滤掉.不用严格模式…
[报错] 报错时安装方法: npm install bcrypt [解决方法] npm install bcryptjs 用 bcryptjs 替换 bcrypt 即可.…
这是因为,引用的插件在node_modules里,并不在vue-cli的es6编译范围内,所以语法报错,修改方法:…
今天在build项目的时候报: ReferenceError: resolve is not defined npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yingyi@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yingy…
# 特定的错误 ERROR in statics/mobile/js/vendor.cef13a0e680a5bc0d8b3.js from UglifyJsUnexpected token: punc (() [D:/Users/Administrator/Desktop/WTFpolice/newPolice/~/mint-ui/src/utils/clickoutside.js:12,0][statics/mobile/js/vendor.cef13a0e680a5bc0d8b3.js:4…
module.exports = { plugins: [ require('autoprefixer')//自动添加css前缀 ] }; 在项目根目录新建postcss.config.js文件,添加上述内容.…
在项目根目录新建postcss.config.js文件,并对postcss进行配置: module.exports = { plugins: [ require('autoprefixer')//自动添加css前缀 ] };…
在main.js里面添加: (function () { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];…