Vue日常报错
报错信息:
Error: Cannot find module 'webpack/bin/config-yargs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (E:\MIKEY\WebStromWorkSpace\TestWebpackVue\node_modules\webpack-dev-server\bin\webpack-dev-server.js:54:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! TestWebpackVue@1.0.0 dev: `webpack-dev-server --open --port 3000 --contentBase src --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the TestWebpackVue@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:
npm ERR! E:\MIKEY\NodeJs\node_cache\_logs\2018-11-21T14_46_04_994Z-debug.log E:\MIKEY\WebStromWorkSpace\TestWebpackVue>npm i webpack@3.8.1 -D > uglifyjs-webpack-plugin@0.4.6 postinstall E:\MIKEY\WebStromWorkSpace\TestWebpackVue\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js npm WARN css-loader@1.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN less-loader@4.1.0 requires a peer of less@^2.3.1 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli@3.1.2 requires a peer of webpack@^4.x.x but none is installed. You must install peer dependencies yourself.
npm WARN TestWebpackVue@1.0.0 No description
npm WARN TestWebpackVue@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
报错截图:
解决方法:webpack和webpack-dev-server版本兼容问题,更改版本即可!
Vue日常报错的更多相关文章
- Vue.js报错Failed to resolve filter问题原因
Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...
- Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' ...
- vue IE 报错 引用babel-polyfill
一.vue 项目报错 vuex requires a Promise polyfill in this browser 在网上找到下面三篇文章,然而和我的项目都不太一样. 我的项目基于 基础模 ...
- 【转】Vue项目报错:Uncaught SyntaxError: Unexpected token <
这篇文章主要介绍了Vue项目报错:Uncaught SyntaxError: Unexpected token <,在引入第三方依赖的 JS 文件时,遇到的一个问题,小编觉得挺不错的,现在分享给 ...
- React Native 日常报错
在学习React.js 或 React Native 过程中,有时看着别人的框架或代码,但总是会出现错误,因为React或之中用到的一些包经常更新,有些代码或教程就显得过旧了. 一.日常报错 'con ...
- vue 项目报错,提示:Cannot read property '$createElement' of undefined at render ...
vue 项目报错,提示:Cannot read property '$createElement' of undefined at render ...
- Vue. 之 报错 Uncaught (in promise)
Vue. 之 报错 Uncaught (in promise) 在点击同一个URL的时候,会报错如下: 解决方案: 在项目目录下运行 npm i vue-router@3.0 -S 即可.
- vue项目报错webpackJsonp is not defined
在vue单页面应用中,我们大概都会使用CommonsChunkPlugin这个插件. 传送门 CommonsChunkPlugin 但是在项目经过本地测试没有任何问题,打包上线后却会报错 webpac ...
- Vue打包报错Unexpected token: punc(()解决方案
(用vscode)vue项目打包时,报错,报错信息如下: ERROR in static/js/0.564c764efc3ecf31190c.js from UglifyJs Unexpected t ...
随机推荐
- 搭建离线下载aria2 树莓派下搭建,以及图形化界面AriaNG
请参考链接 https://www.htcp.net/3652.html https://www.zrj96.com/post-296.html Aria2自动更新BT Tracker服务器列表的方法 ...
- 如何在Linux中显示和设置主机名(适用ubantu、centos等版本)
随着连接到网络的计算机数量越来越多,每一台计算机都需要有一个属性来区别于其它计算机.和现实世界中的人一样,计算机也有一个叫做hostname(主机名)的属性. 什么是hostname 从它的操作手册来 ...
- 谷歌play上APK的下载
https://apkcombo.com/tw-hk/ 在google搜索 APK DOWNLAOD就有专门下载谷歌PLAY的APK的
- EFCore.BulkExtensions Demo
最近做了一个项目,当用EF传统的方法执行时,花时4小时左右,修改后,时间大大减少到10分钟,下面是DEMO实例 实体代码: public class UserInfoEntity { [Key] pu ...
- javascipt——jQuery
1.首先需要导入jQuery1.12.4.js文件,把文件和当前目录放同一目录下.在<body>中写上<script scr = 'jQuery1.12.4.js'><s ...
- HTML连载59-子绝父相
一.子绝父相 1.只使用相对定位,对图片的位置进行精准定位. <!DOCTYPE html> <html lang="en"> <head> & ...
- The Preliminary Contest for ICPC Asia Xuzhou 2019 K. Center
这题对于能加入最多边缘点的center点,这个点就是最优的center ,对于center点,总共是n^2的,顶多也就1e6,所以直接双重循环就行了, 然后map<pair,set >映射 ...
- springboot多模块项目打war包
一.父模块配置 1,指定pakaging:pom 2,指定编译的版本:如下图: <properties> <project.build.sourceEncoding>UTF-8 ...
- Vue项目中sass语法该怎么用?
最近开始着手Vue框架,被各种报错蹂躏,其中有一个就是sass语法,<style>标签中添加<style lang="scss">,发现报错,在网上找了一些 ...
- 计算机二级-C语言-程序填空题-190110记录-文件写入与文件读出显示
//给定程序功能是:从键盘输入若干行文本(每行不超过80个字符),写到文件myfile4.txt中,用-1(独立一行)作为字符串输入结束的标志,然后将文件的内容读到显示在屏幕上.文件的读写分别由自定义 ...