demeteorizer
demeteorizer copied to clipboard
Modulus fails when project uses meteor-webpack package
Hello, I have several projects hosted on modulus. All I do is bundle my projects in a .zip and upload them to the platform. Modulus does the rest ( realize which meteor version to use, which packages to install etc ).
With a project that uses webpack, modulus fails with this output:
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Now using node v4.4.7 (npm v3.10.5)
Initializing Meteor environment.
Using [email protected].
Demeteorizing application...
TypeError: undefined is not a function
at config (eval at readPackageConfig (packages/webpack:webpack/plugin/WebpackCompiler.js:304:28),
While processing files with fourseven:scss (for target web.browser): /src/client/styles/bootstrap-custom.scss: Scss compiler error: File to import: {}/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables not found in file: /mnt/input/{}/src/client/styles/bootstrap-custom.scss
While processing files with webpack:webpack (for target os.linux.x86_64): src/main.js: Entry module not found: Error: Cannot resolve module 'babel' in /mnt/input resolve module babel in /mnt/input
Conversion failed. Build attempt failed, attempting again. Starting build. Creating directories for build environment. Downloading source. Executing build. Now using node v4.4.7 (npm v3.10.5) Initializing Meteor environment. Using [email protected]. Demeteorizing application... Log Stream Disconnected Does someone know a workaround to fix this?
@vladejs do you have any source code that we can test this out with? Also, what changes were made to the project to create this error? If you revert those changes, do you still get the same output?
@theworkflow, Any empty meteor project who uses meteor-webpack package has this error.
You can try with any of thereactivestack starter projects.
The package who causes trouble is here.
To reproduce the error you can try:
meteor create project
cd project
meteor add webpack:webpack webpack:react webpack:coffeescript
# zip the project (without .meteor/local folder)
# and upload it to modulus via web interface
# modulus will throw the above error.
@vladejs Since @theworkflow is on vacation this week, I'm trying to jump in an help. Attempting to reproduce your project I get this:
› meteor add webpack:webpack webpack:scss
=> Errors while parsing arguments:
While adding package webpack:scss:
error: no such package
Hello @jackboberg, the package is webpack:css
. Today I uploaded the same source code to modulus, the only change I made was upgrading meteor version to 1.4.1, it almost worked, but gave me following error.
webpack:webpack added, version 1.3.4
TypeError: ExtractTextPlugin is not a function
at config (eval at readPackageConfig (packages/webpack:webpack/plugin/WebpackCompiler.js:325:28), <anonymous>:57:18)
at packages/webpack:webpack/plugin/WebpackCompiler.js:346:26
at Array.forEach (native)
This is the whole output from modulus:
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Now using node v4.4.7 (npm v3.10.5)
Installing root package.json dependencies.
nvase@ /mnt/input
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]
Initializing Meteor environment.
Using [email protected].
Demeteorizing application...
Changes to your project's package version selections:
accounts-base added, version 1.2.11
accounts-password added, version 1.3.0
aldeed:collection2 added, version 2.10.0
aldeed:collection2-core added, version 1.2.0
aldeed:schema-deny added, version 1.1.0
aldeed:schema-index added, version 1.1.0
aldeed:simple-schema added, version 1.5.3
allow-deny added, version 1.0.5
autoupdate added, version 1.2.11
babel-compiler added, version 6.9.1
babel-runtime added, version 0.1.11
base64 added, version 1.0.9
binary-heap added, version 1.0.9
blaze added, version 2.1.8
blaze-tools added, version 1.0.9
blueimp:javascript-load-image added, version 1.13.1
boilerplate-generator added, version 1.0.9
caching-compiler added, version 1.1.7
caching-html-compiler added, version 1.0.6
callback-hook added, version 1.0.9
check added, version 1.2.3
chuangbo:cookie added, version 1.1.0
coffeescript added, version 1.2.4_1
ddp added, version 1.2.5
ddp-client added, version 1.2.9
ddp-common added, version 1.2.6
ddp-rate-limiter added, version 1.0.5
ddp-server added, version 1.2.10
deps added, version 1.0.12
diff-sequence added, version 1.0.6
ecmascript added, version 0.5.8
ecmascript-runtime added, version 0.3.14
ejson added, version 1.0.12
email added, version 1.1.17
es5-shim added, version 4.6.14
fastclick added, version 1.0.12
fortawesome:fontawesome added, version 4.5.0
fourseven:scss added, version 3.9.0
geojson-utils added, version 1.0.9
hot-code-push added, version 1.0.4
html-tools added, version 1.0.10
htmljs added, version 1.0.10
http added, version 1.2.9
id-map added, version 1.0.8
jquery added, version 1.11.9
kadira:dochead added, version 1.5.0
kadira:flow-router-ssr added, version 3.13.0
launch-screen added, version 1.0.12
livedata added, version 1.0.18
localstorage added, version 1.0.11
logging added, version 1.1.15
mdg:validation-error added, version 0.2.0
meteor added, version 1.2.17
meteor-base added, version 1.0.4
meteorhacks:fast-render added, version 2.14.0
meteorhacks:inject-data added, version 2.0.0
meteorhacks:meteorx added, version 1.4.1
meteorhacks:picker added, version 1.0.3
minifier-css added, version 1.2.14
minifier-js added, version 1.2.14
minimongo added, version 1.0.17
mobile-experience added, version 1.0.4
mobile-status-bar added, version 1.0.12
modules added, version 0.7.6
modules-runtime added, version 0.7.6
mongo added, version 1.1.12
mongo-id added, version 1.0.5
npm-bcrypt added, version 0.9.1
npm-mongo added, version 1.5.49
observe-sequence added, version 1.0.12
ordered-dict added, version 1.0.8
ostrio:cookies added, version 2.0.5
ostrio:files added, version 1.7.3
promise added, version 0.8.4
raix:eventemitter added, version 0.1.3
random added, version 1.0.10
rate-limit added, version 1.0.5
reactive-dict added, version 1.1.8
reactive-var added, version 1.0.10
reload added, version 1.1.10
retry added, version 1.0.8
routepolicy added, version 1.0.11
service-configuration added, version 1.0.10
sha added, version 1.0.8
spacebars added, version 1.0.12
spacebars-compiler added, version 1.0.12
srp added, version 1.0.9
standard-minifier-css added, version 1.2.0
standard-minifier-js added, version 1.2.0
templating added, version 1.2.14
templating-tools added, version 1.0.4
thinksoftware:image-resize-client added, version 1.0.0
tracker added, version 1.1.0
ui added, version 1.0.11
underscore added, version 1.0.9
url added, version 1.0.10
webapp added, version 1.3.11
webapp-hashing added, version 1.0.9
webpack:assets added, version 1.0.1
webpack:coffeescript added, version 1.0.1
webpack:core-config added, version 1.0.1
webpack:css added, version 1.1.2
webpack:json added, version 1.0.1
webpack:npmworkaround added, version 1.0.0
webpack:react added, version 1.2.2
webpack:reload added, version 1.0.1
webpack:webpack added, version 1.3.4
TypeError: ExtractTextPlugin is not a function
at config (eval at readPackageConfig (packages/webpack:webpack/plugin/WebpackCompiler.js:325:28), <anonymous>:57:18)
at packages/webpack:webpack/plugin/WebpackCompiler.js:346:26
at Array.forEach (native)
at Object.load (packages/webpack:webpack/plugin/WebpackCompiler.js:344:15)
at WebpackCompiler.processFilesForTarget (packages/webpack:webpack/plugin/WebpackCompiler.js:152:13)
at __bottom_mark__ (/tools/utils/parse-stack.js:64:14)
at /tools/isobuild/compiler-plugin.js:188:13
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at /tools/isobuild/compiler-plugin.js:177:22
at Function.time (/tools/tool-env/profile.js:305:10)
at /tools/isobuild/compiler-plugin.js:176:15
at Function._.each._.forEach (/mnt/home/.meteor/packages/meteor-tool/.1.4.1.nxkzts++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
at CompilerPluginProcessor.runCompilerPlugins (/tools/isobuild/compiler-plugin.js:166:7)
at ClientTarget._runCompilerPlugins (/tools/isobuild/bundler.js:918:22)
at /tools/isobuild/bundler.js:698:34
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at ClientTarget.make (/tools/isobuild/bundler.js:692:18)
at /tools/isobuild/bundler.js:2586:14
at /tools/isobuild/bundler.js:2675:20
at Array.forEach (native)
at Function._.each._.forEach (/mnt/home/.meteor/packages/meteor-tool/.1.4.1.nxkzts++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at /tools/isobuild/bundler.js:2674:7
at /tools/utils/buildmessage.js:271:13
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:264:29
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:262:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:253:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.capture (/tools/utils/buildmessage.js:252:19)
at bundle (/tools/isobuild/bundler.js:2567:31)
at /tools/isobuild/bundler.js:2514:32
at Object.withCache (/tools/fs/files.js:1585:12)
at Object.exports.bundle (/tools/isobuild/bundler.js:2514:16)
at buildCommand (/tools/cli/commands.js:918:30)
at Command.func (/tools/cli/commands.js:798:12)
at /tools/cli/main.js:1410:23
@vladejs Still attempting to reproduce your instructions locally, before attempting to deploy to Modulus:
› meteor add webpack:webpack webpack:react webpack:coffeescript
Changes to your project's package version selections:
webpack:assets added, version 1.0.1
webpack:coffeescript added, version 1.0.1
webpack:core-config added, version 1.0.1
webpack:css added, version 1.1.2
webpack:json added, version 1.0.1
webpack:npmworkaround added, version 1.0.0
webpack:react added, version 1.2.2
webpack:reload added, version 1.0.1
webpack:webpack added, version 1.3.4
webpack:webpack: Seamlessly integrate Webpack to improve Meteor build system
webpack:react: Integrate React with Webpack
webpack:coffeescript: Integrate CoffeeScript with Webpack
And then:
› meteor run
[[[[[ ~/Documents/Projects/modulus/_sandbox/meteor/webpack/project ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:
While determining active plugins:
error: conflict: two packages included in the app (webpack:webpack and ecmascript) are both trying to handle *.js
error: conflict: two packages included in the app (webpack:webpack and ecmascript) are both trying to handle *.jsx
While determining active plugins:
error: conflict: two packages included in the app (webpack:webpack and ecmascript) are both trying to handle *.js
error: conflict: two packages included in the app (webpack:webpack and ecmascript) are both trying to handle *.jsx
=> Your application has errors. Waiting for file change.
Are you not getting that locally? If you would rather, you can open a support ticket and provide access to your source. [email protected]
Did you at least read the error? Pretty obvious to me:
meteor remove ecmascript
That's a prerequisite to work with webpack:webpack
package.
Anyway, I am wondering why you are trying to reproduce the error by creating a project yourself?. In my comment above there is a link with tons of kickstarter project that uses webpack:webpack
package. You can try any of them. However, I don't think they will have trouble locally, because locally everything works perfect to me:
meteor --production # works
meteor build # works
demeteorizer -o output # works
Troubles are when uploading to modulus, so, take a kickstarter and try to deploy it there.
I am trying to follow your example exactly so that I know if I get my app to work I can confidently tell you how I resolved it.
Following along, after meteor remove ecmascript
I get another error.
Cannot find the entry point "index.js" for the web
Of course the next step is obvious, but again, I'm trying to duplicate your exact issue. Since you now think following your example script is a waste of time, I will stop..
Grabbing a sample project from thereactivestack/kickstart now..
Yes, create a webpack project from scratch involves generating some files manually, like your missing index.js.
I recommended using a kickstart project because the problem is common for every one of them. It doesn't matter how the project is created, if it uses webpack:webpack package, it will throw errors on modulus. So, you can grab the one you prefer.
Also notice that locally no errors are thrown. El 7/9/2016 1:43 PM, "Jack Boberg" [email protected] escribió:
I am trying to follow your example exactly so that I know if I get my app to work I can confidently tell you how I resolved it.
Following along, after meteor remove ecmascript I get another error.
Cannot find the entry point "index.js" for the web
Of course the next step is obvious, but again, I'm trying to duplicate your exact issue. Since you now think following your example script is a waste of time, I will stop..
Grabbing a sample project from thereactivestack https://github.com/thereactivestack/ now..
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/onmodulus/demeteorizer/issues/224#issuecomment-245360311, or mute the thread https://github.com/notifications/unsubscribe-auth/AMDUAhxzXzgs-1f7O16hH16hqpg_7_rgks5qnvepgaJpZM4JzGOH .
@vladejs reproduced the issue with kickstart-meteor-react-flowrouter. I'll update if/when I find any resolutions..
It would be awesome to find a solution to this error, since we are migrating several meteor projects to use webpack and don't want to switch to galaxy yet.
@jackboberg , @theworkflow , please see #235