Comments (27)
@yyx990803 @chrisvfritz @funkyLover https://github.com/vuejs/vue-loader/blob/master/lib/loader.js#L14 - this regex matches html
word. So, if project path contains html
word somewhere - https://github.com/vuejs/vue-loader/blob/master/lib/loader.js#L99 will separate path with bang right after the html word
from webpack.
I'll try to reproduce and fix this in the next few days on my Linux box.
from webpack.
@chrisvfritz awesome, thanks in advance! :D
from webpack.
@yyx990803 Wasn't able to reproduce this, unfortunately.
- ubuntu 15.10 64-bit
- linux 4.2.0-16-generic
- npm 3.7.3
- node 5.8.0
I'm happy to dig in further though, with more information about the systems this fails on.
from webpack.
I don't have much experience on Webpack but since I'm having this issue I can help.
I'm running Fedora 22, with Node v5.3.0 and NPM v3.3.12 and I'm having the following issue :
Uncaught Error: Cannot find module "-!./../../../../..!./../../../node_modules/vue-loader/lib/style-rewriter.js!./../../../../../../../../project/manager/node_modules/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!vue-style-loader!css-loader!./../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!./login.vue"
If you need more info, I'll be happy to provide them :)
from webpack.
Thanks @cnicodeme! 😃 I'll try to replicate this in a Docker container and see what happens. In the meantime though - can you try deleting the extract-text-webpack-plugin
in your node_modules
, then re-running npm install
? Knowing if that fixes the problem could be useful.
from webpack.
For information, I'm working on my project on two different computer, the second one is an Ubuntu installation :
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
And the npm run build
works correctly.
On that computer, here's the different versions :
$ node -v
v4.1.1
$ npm -v
v2.14.4
from webpack.
(I wrongly posted this in the old tickets, so I'm copying it here) :
Hi tested something on my installation :
I initiated a new project using vue-cli and webpack, and did npm install && npm run build
and I got this error :
ERROR in ./src/App.vue
Module not found: Error: Cannot resolve 'file' or 'directory' ./../../../../../../test/node_modules/extract-text-webpack-plugin/loader.js in /var/www/html/test/src
@ ./src/App.vue 2:0-321
Child html-webpack-plugin for "../index.html":
I had this issue without modifying anything.
Maybe that would help, but despite the fact that I've installed vue-cli as root using npm install -g vue-cli, I don't have any vue
command in my $PATH so I did the following :
/opt/node/5.3.0/lib/node_modules/vue-cli/bin/vue init webpack test
And odly, it correspond to the number of .. in the above error message.
Hoping that this could help! :)
from webpack.
(I wrongly posted this in the old tickets, so I'm copying it here) :
I updated Node & NPM :
$ node -v
v5.8.0
$ npm -v
3.8.1
And retried a build on my app, without any luck. The problem remain.
from webpack.
Since I tested a fresh installation on vuejs, I seriously doubt removing the extract-text-webpack-plugin
in node_modules
will fix the issue, but to be sure, I'll try.
...
And it did not fixed the issue, unfortunately.
I'll see if I can find more details, but for now, I'd say it's related to Fedora
from webpack.
@cnicodeme Wow, that's great information and should definitely help narrow it down! I'll let you know if I'm still not able to reproduce it or have any other questions.
from webpack.
Feel free to ask, I'm concerned about this problem :)
I'm sorry I can be of much help regarding the package in question, I'm quite new to Node and I couldn't narrow where the problem is in extract-text-webpack-plugin
.
from webpack.
No worries - you've already been a huge help!
from webpack.
Darn, I'm still having difficulty reproducing this, even on Fedora. 😕 I've run out of ideas currently, but I'll leave this open to see if someone else might be able to find a solution. @cnicodeme Thank you again for all your help narrowing it down! If you haven't already, I'd also open an issue in extract-text-webpack-plugin, now that we have more information.
from webpack.
same issue as @cnicodeme
from webpack.
@cipas @cnicodeme I'd open an issue in extract-text-webpack-plugin detailing your issue. If you find a solution to your problem, please let us know back here!
from webpack.
The error seems to occur due to
if (options.extract) {
return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
} else {
return ['vue-style-loader', sourceLoader].join('!')
}
in css-loaders.js
.
Specifically in return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
.
Without it npm run build
executes without any issues. If you set extract
to false
in webpack.base.conf.js
, it works fine.
I am on eOS Freya.
from webpack.
@pratyushbarik Thanks for adding new information. If you happen to find a way to get the plugin to work without disabling it, please do post back here. 😃
from webpack.
@chrisvfritz same issue, and unfortunately, on OSX El Capitan 10.11.4
~ node -v
v4.4.0
~ npm -v
3.8.2
but someting weird
I have tried create two project with vue-cli
vue init webpack haha
& vue init webpack html
and within project haha
npm install
npm run build
it work fine!
but in project html
, it will get error
ERROR in ./src/App.vue
Module not found: Error: Cannot resolve 'file' or 'directory' ./../../../../../node_modules/extract-text-webpack-plugin/loader.js in /Users/funkyLover/Desktop/html/src
@ ./src/App.vue 2:0-294
ERROR in ./src/components/Hello.vue
Module not found: Error: Cannot resolve 'file' or 'directory' ./../.. in /Users/funkyLover/Desktop/html/src/components
@ ./src/components/Hello.vue 2:0-335
is it possible caused by the folder name? 😂
from webpack.
i find out all the error report have html
with their project path 😂
issue by @sunny-rajkotiya
issue by @cnicodeme
issue by @voigt
issue by @2eron
and i try vue init webpack haha
in a html
folder and npm run build
the error again 😂
from webpack.
Wow, we're on to something, finally
On Fri, Apr 8, 2016 at 4:32 AM Joseph [email protected] wrote:
i find out all the error report have html with their project path 😂
issue by @sunny-rajkotiya
vuejs/vue-cli#19 (comment)
issue by @cnicodeme
#41 (comment)
issue by @voigt
vuejs/vue-cli#19 (comment)
issue by @2eron
vuejs/vue-cli#19 (comment)and i try vue init webpack haha in a html folder and npm run build
the error again 😂
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#41 (comment)
from webpack.
Yeah nice! :)
from webpack.
@funkyLover, I love your funk! Thank you for putting that together like a master detective. 😄 I'll investigate this and see if I can figure out what's going on.
from webpack.
@oaleynik ooohhhhh ok I'll look into it!
from webpack.
@yyx990803 PR with fix vuejs/vue-loader#205
I didn't find a way how to compose proper regex to skip absolute paths with html
and css
words in it, so I went another way - I do split loader string by !
and inject rewriter into each part separately. If part contains path.sep
I consider it as filesystem path and skip injection.
from webpack.
Thanks to everyone who helped out locating the issue! It's fixed in [email protected]
.
from webpack.
@yyx990803 尤大大 请问iview怎么集成到asp.net项目中?
from webpack.
Related Issues (20)
- I run this new project,but this show nothing in IE 11,can you solve the problem?
- r 403 forbidden
- Actually, you could overwrite `publicPath` in `ExtractTextPlugin` as you want. HOT 1
- HMR with express server with NodeJS API
- When load image via binding attribute, scss error occure.
- The vue project is configured with babel-polyfill but still displays a blank page in ie
- Updated Webpack 2 to 4 and faced issues while building for production
- webpack test fails because of import export error!!!
- Vuetify : "Expected newline." loading vuetify sass files HOT 1
- Laravel Vue templates won't update on shared hosting!
- npm err unexpected end of json input while parsing near '... RE----\r\n"}},"1.2.0' HOT 1
- how i solve this HOT 2
- Build error related to "@import" of styles HOT 1
- Can`t use prod.env.js variable in proxy config
- Error: Can't resolve '@fontawesone/fontawesone-free/css/all.css' in 'D:\xamppp\htdocs\laravel\laravel\VeuDemo\login1\login1\src\plugins'
- set default assetsPublicPath to './' instead of '/'
- npm ERR! Unexpected end of JSON input while parsing near '.../registry.npmjs.org/v'
- Using VueJs in .Net MVC. everything compiles fine but i am getting an empty view
- > > I run this is the console of my navigator (Chrome), and no error message anymore :
- how to fix npm run build blank display with vue-cli 3.2.45
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack.