码迷,mamicode.com
首页 > Web开发 > 详细

ERROR in [copy-webpack-plugin] unable to locate "D:/xxx/xxx/xxx"

时间:2018-02-11 18:06:46      阅读:1671      评论:0      收藏:0      [点我收藏+]

标签:ble   inf   文件夹   没有   bubuko   com   nta   oca   UI   

vue打包的时候npm run build报错

ERROR in [copy-webpack-plugin] unable to locate "D:/xxx/xxx/xxx"

这表示这个路径出现了错误,找不到正确路径

在你的项目文件夹中找一找有没有这个路径的文件,没有的话,按这个路径把缺失的相应的文件放到里面再重新打包就行了

例如我打包一直报错

ERROR in [copy-webpack-plugin] unable to locate ‘D:\trainh5vue\Content‘ at ‘D:\trainh5vue\Content‘

找了找发现有两样式文件一直没有打包进去,而index.html文件里是这样的

<link rel="stylesheet" href="Content/style/static.css">
<link rel="stylesheet" href="Content/style/fontAwesome/css/font-awesome.min.css">

打包生成的文件层级是这样的

 技术分享图片

但这个文件夹的命名不对,所以一直报错,发现存放style的文件夹名不是Content,就把文件夹改成Content,再npm run build 就好了

 

ERROR in [copy-webpack-plugin] unable to locate "D:/xxx/xxx/xxx"

标签:ble   inf   文件夹   没有   bubuko   com   nta   oca   UI   

原文地址:https://www.cnblogs.com/leiting/p/8442214.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!