Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug breaks on current release candidate #718

Closed
chopfitzroy opened this issue Dec 20, 2016 · 7 comments
Closed

Debug breaks on current release candidate #718

chopfitzroy opened this issue Dec 20, 2016 · 7 comments

Comments

@chopfitzroy
Copy link

Using: v2.2.0-rc.0

Do you want to request a feature or report a bug?

Was originally a bug posted here but is relevant to all rc users.

If the current behavior is a bug, please provide the steps to reproduce.

There is currently an issue with the debug module which has been fixed on master but not officially released yet.

It prevents the sever from running correctly with the following output:

ERROR in ./~/debug/browser.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/home/otis/Developer/hassle/node_modules/debug"                                                        
    at /home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/options/option-manager.js:299:19                                                                     
    at Array.map (native)                                                                                                                                                               
    at OptionManager.resolvePresets (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/options/option-manager.js:270:20)                                      
    at OptionManager.mergePresets (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/options/option-manager.js:259:10)                                        
    at OptionManager.mergeOptions (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/options/option-manager.js:244:14)                                        
    at OptionManager.init (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)                                                
    at File.initOptions (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/index.js:216:65)                                                                   
    at new File (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/file/index.js:139:24)                                                                           
    at Pipeline.transform (/home/otis/Developer/hassle/node_modules/babel-core/lib/transformation/pipeline.js:46:16)                                                                    
    at transpile (/home/otis/Developer/hassle/node_modules/babel-loader/lib/index.js:38:20)                                                                                             
 @ ./~/sockjs-client/lib/main.js 25:10-26                                                                                                                                               
 @ ./~/sockjs-client/lib/entry.js                                                                                                                                                       
 @ (webpack)-dev-server/client/socket.js                                                                                                                                                
 @ (webpack)-dev-server/client?http://localhost:4000                                                                                                                                    
 @ multi main

To fix in the meantime you can add this to your package.json:

"debug": "git://github.com/visionmedia/debug#master"

What is the expected behavior?

For the server to run without breaking.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention your webpack and Operating System version.

Using webpack v2.2.0-rc.0 and Ubuntu 16.04.

@SpaceK33z
Copy link
Member

What exactly do you suggest I can do with that here? debug is not a direct dependency of webpack-dev-server...

@chopfitzroy
Copy link
Author

chopfitzroy commented Dec 20, 2016

Hey @SpaceK33z I put it here as an intended reference for other users using v2.2.0-rc.0 who come across the problem, and I have tried to provide a in the meantime fix. I do not expect you to do anything with it, just thought you may be interested in knowing...?

@SpaceK33z
Copy link
Member

Sure, thanks for sharing, but this is really a configuration issue. You shouldn't let babel-loader search in all node_modules/ packages, if you do that any random package can cause breakage.

Either use babel-loader with an exclude or include property like this:

{
    test: /\.js$/,
    exclude: /node_modules/,
    loader: 'babel-loader',
},

@chopfitzroy
Copy link
Author

chopfitzroy commented Dec 20, 2016

Hey @SpaceK33z I have that already (which you can see in SO issue), from what I can tell from the linked debug issue it has nothing to do with my babel config, it is also worth noting it works flawlessly when doing a build without the webpack-dev-server so I do not think doing the above will help.

@SpaceK33z
Copy link
Member

I really doubt that, webpack-dev-server doesn't even "know" about Babel, it doesn't have it as dependency nor does it do anything with Babel. In your StackOverflow question I saw you doing exclude: ['/node_modules/'], I think that should be exclude: [/node_modules/].

@chopfitzroy
Copy link
Author

I will double check tonight when I get home but all of my other excludes have been handled like that and appear to be working, will let you know.

@chopfitzroy
Copy link
Author

Hey @SpaceK33z only just got back to this today, looks like you were spot on about the /node_modules/ I have updated and everything appears to be working.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants