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

Update typescript block to work with webpack 4 #296

Open
s-h-a-d-o-w opened this issue Sep 25, 2018 · 4 comments
Open

Update typescript block to work with webpack 4 #296

s-h-a-d-o-w opened this issue Sep 25, 2018 · 4 comments

Comments

@s-h-a-d-o-w
Copy link

I'm using webpack-blocks to provide configuration to react-styleguidist and experienced the following errors.

TypeError: resolver.ensureHook is not a function
TypeError: resolver.ensureHook is not a function
    at ModulesInRootPlugin.apply (C:\Users\sh4dow\development\github\fructosedb\node_modules\enhanced-resolve\lib\ModulesInRootPlugin.js:15:27)
    at PathPlugin.apply (C:\Users\sh4dow\development\github\fructosedb\node_modules\awesome-typescript-loader\src\paths-plugin.ts:114:71)
    at webpack (C:\Users\sh4dow\development\github\fructosedb\node_modules\webpack\lib\webpack.js:37:12)
    at createServer (C:\Users\sh4dow\development\github\fructosedb\node_modules\react-styleguidist\scripts\create-server.js:27:19)
    at server (C:\Users\sh4dow\development\github\fructosedb\node_modules\react-styleguidist\scripts\server.js:5:21)
    at commandServer (C:\Users\sh4dow\development\github\fructosedb\node_modules\react-styleguidist\bin\styleguidist.js:123:19)
    at Object.<anonymous> (C:\Users\sh4dow\development\github\fructosedb\node_modules\react-styleguidist\bin\styleguidist.js:72:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
error Command failed with exit code 1.

I've resolved it locally by using this configuration and updating the versions of awesome-typescript-loader and typescript to the latest ones. (The latter just to get rid of most deprecation warnings)

If you want me to, I'll prepare a PR for this.

@andywer
Copy link
Owner

andywer commented Sep 25, 2018

Hey @s-h-a-d-o-w, thanks for reporting!

Which version of webpack-blocks are you running? The v2 prerelease?

@s-h-a-d-o-w
Copy link
Author

s-h-a-d-o-w commented Sep 26, 2018

You're welcome. :)
Yes, I am using 2.0.0-alpha.

@andywer
Copy link
Owner

andywer commented Sep 26, 2018

Cool. Yeah, a PR would be appreciated :)

@andywer
Copy link
Owner

andywer commented Sep 26, 2018

(Please target the PR to the release-2.0 branch if you create one 😉)

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