Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Parallel webpack builds fails. #323

Closed
cvle opened this issue Dec 15, 2016 · 15 comments
Closed

Parallel webpack builds fails. #323

cvle opened this issue Dec 15, 2016 · 15 comments

Comments

@cvle
Copy link

cvle commented Dec 15, 2016

When running webpack with multiple configs (=parallel) the build fails with the following messages:

Unknown message:  { emitResult: 
   { text: '/**\r\n * @license\r\n * Copyright (C) 2016 Chi Vinh Le and contributors.\r\n *\r\n * This software may be modified and distributed under the terms\r\n * of the MIT license. See the LICENSE file for details.\r\n */\r\nimport * as bowser from "bowser";\r\n// bowser id -> caniuse id\r\nvar browserIDMap = {\r\n    msie: "ie",\r\n    msedge: "edge",\r\n    firefox: "firefox",\r\n    chrome: "chrome",\r\n    safari: "safari",\r\n    opera: "opera",\r\n    ucbrowser: "and_uc",\r\n    samsungBrowser: "samsung",\r\n    blackberry: "bb",\r\n    android: "android",\r\n    ios: "ios_saf",\r\n};\r\n/**\r\n * @param {String} ua optional user-agent\r\n */\r\nexport function detectBrowser(ua) {\r\n    var bowserInst = ua ? bowser._detect(ua) : bowser;\r\n    var version = bowserInst.version;\r\n    var bid = "unknown";\r\n    for (var b in browserIDMap) {\r\n        if (bowserInst[b]) {\r\n            bid = browserIDMap[b];\r\n            break;\r\n        }\r\n    }\r\n    // no opera mini support yet: https://github.com/ded/bowser/issues/158\r\n    if (bid === "chrome" && bowserInst.android) {\r\n        bid = "and_chr";\r\n    }\r\n    else if (bid === "safari" && bowserInst.ios) {\r\n        bid = "ios_saf";\r\n    }\r\n    else if (bid === "ie" && bowserInst.windowsphone) {\r\n        bid = "ie_mob";\r\n    }\r\n    // use mobile os version.\r\n    if (bid === "android") {\r\n        version = bowserInst.osversion;\r\n    }\r\n    else if (bid === "ios_saf") {\r\n        version = bowserInst.osversion;\r\n    }\r\n    return { id: bid, version: version };\r\n}\r\nexport var currentBrowser = detectBrowser();\r\n//# sourceMappingURL=browser.js.map',
     sourceMap: '{"version":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AI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QACnD,GAAG,GAAG,QAAQ,CAAC;IACjB,CAAC;IAED,yBAAyB;IACzB,EAAE,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC;IACjC,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC;QAC7B,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC;IACjC,CAAC;IACD,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,SAAA,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,IAAM,cAAc,GAAG,aAAa,EAAE,CAAC"}',
     declaration: undefined },

Check out the build log here:
https://travis-ci.org/wikiwi/caniuse-support/jobs/184193513

And the configuration here:
https://github.com/wikiwi/caniuse-support/blob/7563133e568f3f0f4c5742d25276d8d21a45dcd0/webpack.config.js

I am using version 3.0.0-beta.17 and webpack version 2.2.0-rc.0.

Running them sequentially works without issues.

@pselden
Copy link

pselden commented Dec 15, 2016

I think i have a similar issue although it is when running multiple instances of awesome-typescript-loader in a single configuration.

@pselden pselden mentioned this issue Dec 15, 2016
14 tasks
@rjokelai
Copy link

I'm having a similar issue with multi-compiler webpack configurations. When disabling one or the other, everything works fine. instance option has no effect

@davidspiess
Copy link

Same problem here with webpack 1

@sanex3339
Copy link

same problem

@vtabary
Copy link

vtabary commented Jan 6, 2017

I had this problem (3.0.0-beta.17). I fixed it, for now, by using the version 3.0.0-beta.13.

I'm using webpack 2.2.0-rc3

And my tsconfig.json contains :

  "awesomeTypescriptLoaderOptions": {
    "forkChecker": true,
    "useWebpackText": true
  },

And I installed the CheckerPlugin as mentionned here https://github.com/s-panferov/awesome-typescript-loader#configuration

Hope this will help

@FrozenPandaz
Copy link

FrozenPandaz commented Jan 12, 2017

I have this same issue with webpack 2.2.0-rc4 on Windows and the node(boron) Docker Container

@georgiosd
Copy link

Same problem here with beta18, workaround above works.

@JohnLouderback
Copy link

Same problem here

@ocombe
Copy link

ocombe commented Jan 27, 2017

Same thing here, rolling back to beta 13 until then

@frenic
Copy link

frenic commented Jan 27, 2017

@ThaNarie way worked. It actually speed up my build time so I might even keep it that way.

@inzerceubytovani
Copy link

Same problem appears when using array in module exports like:

module.exports = [
    webpackMerge({}, defaultConfig, commonConfig, clientConfig),
    webpackMerge({}, defaultConfig, commonConfig, serverConfig)
  ];

@s-panferov
Copy link
Owner

This is already fixed in master. Release will be ready soon.

@JohnLouderback
Copy link

@s-panferov Any news? Is the release still happening shortly?

@inzerceubytovani
Copy link

Look it works now. Great job, thanks!

@vlavella
Copy link

What version of webpack are you running? I'm having the save issue with the 2.2.1 version

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

No branches or pull requests