Code Monkey home page Code Monkey logo

demeteorizer's Introduction

Demeteorizer

NPM version Build Status

CLI tool to convert a Meteor app into a "standard" Node.js application. The resulting app contains a package.json file with all required dependencies and can be easily ported to your own servers or Node.js PAAS providers.

Note that version 3 of Demteorizer changes the output structure, which may cause issues depending on how/where you are deploying your application. With the new structure, the generated node application is available in bundle/programs/server.

How Demeteorizer Works

Demeteorizer bundles your Meteor application using meteor build then updates the generated package.json to include all of the necessary properties for running the application on a PaaS provider.

Installing

Install Demeteorizer globally using npm

$ npm install -g demeteorizer

Usage

$ cd /path/to/meteor/app
$ demeteorizer [options]

-h, --help                 output usage information
-V, --version              output the version number
-o, --output <path>        Output folder for converted application [.demeteorized]
-a, --architecture <arch>  Build architecture to be generated
-d, --debug                Build the application in debug mode (don't minify, etc)
-j, --json <json>          JSON data to be merged into the generated package.json

Windows Support

Demeteorizer works on Windows; however, errors will occur when repeatedly running demeteorizer in Node.js versions prior to 0.12.4.

The workaround on earlier versions on Node.js is to delete to generated .demeteorized directory before rerunning demeteorizer.

Meteor 0.8.1 and Below

Meteor version 0.8.1 and below are only supported in Demeteorizer version v0.9.0 and Modulus CLI v1.1.0. For all other versions, use the latest version of Demeteorizer.

This is because the bundle command changed in 0.9 which makes backward compatibility impossible. :(

Running Resulting Application

Meteor applications make use of the following environment variables:

  1. MONGO_URL='mongodb://user:password@host:port/databasename?autoReconnect=true'
  2. ROOT_URL='http://example.com'
  3. MAIL_URL='smtp://user:password@mailhost:port/' (optional)
  4. PORT=8080 (optional, defaults to 80)

Note that demeteorized applications still require a MongoDB connection in order to correctly run. To run your demeteorized application locally, you will need MongoDB installed and running.

Run the app:

$ cd /your/output/directory/bundle/programs/server
$ npm install
$ MONGO_URL=mongodb://localhost:27017/test PORT=8080 ROOT_URL=http://localhost:8080 npm start

Examples

Convert the Meteor app in the current directory and output to ./.demeteorized

$ demeteorizer

Convert the Meteor app in the current directory and output to ~/meteor-app/converted

$ demeteorizer -o ~/meteor-app/converted

The following steps will create a Meteor example app, convert it, and run it.

$ git clone https://github.com/meteor/leaderboard
$ cd leaderboard
$ demeteorizer
$ cd .demeteorized/bundle/programs/server
$ npm install
$ MONGO_URL=mongodb://localhost:27017/test PORT=8080 ROOT_URL=http://localhost:8080 npm start

Visit http://localhost:8080 in your browser.

Modifying the Generated package.json

The --json option will allow you to pass arbitrary JSON data that will be added to the generated package.json. You can use this to override settings in package.json or to add arbitrary data.

settings.json

{
  "key": "some-key-data",
  "services": {
    "some-service": {
      "key": "another-key"
    }
  }
}

Add settings.json data to the generated package.json

$ demeteorizer --json "{ \"settings\": $(cat settings.json) }"

The resulting package.json will have a settings property that includes the JSON from settings.json.

You can also use this to override settings

$ demeteorizer --json "{ \"engines\": { \"node\": \"0.12.x\" } }"

This will result in a package.json with the node engine set to 0.12.x.

Debug

The --debug option is passed to the meteor build command indicating to meteor that the application should not be minified.

$ demeteorizer --debug

Support

Demeteorizer has been tested with the current Meteor example apps. If you find an app that doesn't convert correctly, throw an issue in Github - https://github.com/onmodulus/demeteorizer/issues

Release History

See releases.

demeteorizer's People

Contributors

adambrodzinski avatar cwohlman avatar danieldent avatar doctorpangloss avatar fiveisprime avatar greenkeeperio-bot avatar inconceivableduck avatar jackboberg avatar julianduque avatar lepozepo avatar lukasz-lysik avatar miroradenovic avatar parasj avatar thereddest avatar theworkflow avatar vincilbishop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demeteorizer's Issues

space in Input folder name causes error

I had a folder called "Local Dev", which caused demeteorizer to fail. I renamed it by removing the space, and it worked.

So maybe someone should modify the code to handle folders with spaces?

macbookpro-2:quotebuilder MaxHodges$ demeteorizer -n 0.8.24
Input: /Users/MaxHodges/Documents/Local Dev/github/quotebuilder
Output: /Users/MaxHodges/Documents/Local Dev/github/quotebuilder/.demeteorized
Creating output folder.
Bundling Meteor App...
ERROR: /bin/sh: line 0: cd: /Users/MaxHodges/Documents/Local: No such file or directory

macbookpro-2:quotebuilder MaxHodges$ ls
README.md client packages public server
macbookpro-2:quotebuilder MaxHodges$ demeteorizer -n 0.8.24
Input: /Users/MaxHodges/Documents/localdev/github/quotebuilder
Output: /Users/MaxHodges/Documents/localdev/github/quotebuilder/.demeteorized
Bundling Meteor App...
meteor bundle generation complete.

Demeteorizing samples on Windows

FYI, my experience on Windows:

C:\Program Files (x86)\Meteor\leaderboard>npm install -g demeteorizer
npm http GET https://registry.npmjs.org/demeteorizer
npm http 304 https://registry.npmjs.org/demeteorizer
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/fs-tools
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/fs-tools
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/lodash
C:\Users\Joey\AppData\Roaming\npm\demeteorizer -> C:\Users\Joey\AppData\Roaming
npm\node_modules\demeteorizer\bin\demeteorizer
[email protected] C:\Users\Joey\AppData\Roaming\npm\node_modules\demeteorizer
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected] ([email protected])
โ””โ”€โ”€ [email protected] ([email protected])

C:\Program Files (x86)\Meteor\leaderboard>demeteorizer
Input: C:\Program Files (x86)\Meteor\leaderboard
Output: C:\Program Files (x86)\Meteor\leaderboard.demeteorized
Creating output folder.
Bundling Meteor App...
Errors prevented bundling:

ERROR: WARN: ERROR: Unexpected character '#' [?:40740,13]

C:\Program Files (x86)\Meteor\leaderboard>cd..

C:\Program Files (x86)\Meteor>cd todos

C:\Program Files (x86)\Meteor\todos>demeteorizer
Input: C:\Program Files (x86)\Meteor\todos
Output: C:\Program Files (x86)\Meteor\todos.demeteorized
Creating output folder.
Bundling Meteor App...
meteor bundle generation complete.
Extracting bundle.
ERROR: Error: Command failed: 'tar' is not recognized as an internal or external
command,
operable program or batch file.

C:\Program Files (x86)\Meteor\todos>

Document what happens when overwriting the same output directory

I get ERROR: Output folder must be empty.

For repeated deployments, there should be an option to just overwrite the contents? On the other hand, simply wiping out the output directory and everything in it is risky, because log files could end up stored there.

The general idea is to allow for a similar workflow to meteor bundle, where the downtime can be effectively zero.

Unknown error on use

when I run demetorizer on my app I get the following output:
Output: /Development/projects/user-management/sertalUM/.demeteorized
Bundling Meteor App...
ERROR: Error: Command failed:

How can I check what went wrong?

Upgrading to 0.6.6 lock issues

I just upgraded to the latest version of both Meteor and this plugin (0.3.1). When i attempt to run my application, i get an error.

npm ERR! missing: demeteorizer@*, required by undefined@undefined
npm ERR! not ok code 0

Wondering if anyone else has seen this ?

Support Npm.depends with a github tarball url

When adding a package with a Npm.depends call like this:

Npm.depends({"sportsdata" : "https://github.com/BeDifferential/node-sportsdata/tarball/0b3cac46aa357c194c72645bde72f3ce9b757705"});

It seems that demeteorizer is still pulling the package from Npmjs.org, because the code I added in my github branch is missing. I added a call of getGameStatsAndScores (https://github.com/BeDifferential/node-sportsdata/commit/0b3cac46aa357c194c72645bde72f3ce9b757705) and Modulus is showing this in the logs:

Exception in setInterval callback: TypeError: Object #<Object> has no method 'getGameScoreAndStats'
    at checkGame (server/gameData.coffee:50:19)
    at server/gameData.coffee:68:4
    at Array.forEach (native)
    at Function._.each._.forEach (packages/underscore/underscore.js:105)
    at findRunningGames (server/gameData.coffee:67:4)
    at _.extend.withValue (packages/meteor/dynamics_nodejs.js:35)
    at packages/meteor/timers.js:6

The project is fantasyhub-11301.onmodulus.net for reference.

Adding CDN url in app.html for CSS & JS

Hi,

Thanks for demeteorizer. It is very useful in the meteor deployment.

In the demeteorizer script, can you add the following feature. This helps everyone to have a better initial load experience for meteor projects.

demeteorizer -n 0.10.21 -cdn https://xxxx.cloudfront.net (or any cdn url)

or with an environment variable called CDN_URL stored in the project. This can be useful for modulus or any other PAAS deployments to pick it before running demeteorizer.

This will be converted in app.html produced by demeteorizer as following

<link rel="stylesheet" href="https://xxxx.cloudfront.net/8bdd2467e6f7668b49ed65b2ada56485fa17dbdf.css">

 <script type="text/javascript" src="https://xxxx.cloudfront.net/473509c044261c4d9fde1939f4d51a1bd19aa7b2.js"></script>

Obviously, you can do these steps using a bash script or manually editing them. Doing this with demeteorizer will be very useful.

Let me know if it is possible or if you have any other better ideas.

Thanks again

Demeteorizer throwing Error: EACCES, permission denied error

I'm trying a deploy an app I just updated to Meteor 0.9.0. During the demeteorizing stage, I get the following error.

I am running this on OSX Mavericks.

$ modulus deploy
Welcome to Modulus
You are logged in as pjbrow
Please choose which project to use:
  1) ideas-staging
[?] project 1
Selecting ideas-staging

Meteor project detected...
Creating output folder.
Bundling Meteor App...
meteor bundle generation complete.
Extracting bundle.
Extraction complete.
Finding dependencies...
0 dependencies found.
Creating package.json file.
package.json file generation complete.
Setting minimum node version to v0.10.22

fs.js:432
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EACCES, permission denied '/Users/Pat/code/ideas/.demeteorized/programs/server/boot.js'
    at Object.fs.openSync (fs.js:432:18)
    at Object.fs.writeFileSync (fs.js:971:15)
    at Demeteorizer.setNodeVersion (/usr/local/lib/node_modules/modulus/node_modules/demeteorizer/lib/demeteorizer.js:323:6)
    at /usr/local/lib/node_modules/modulus/node_modules/demeteorizer/lib/demeteorizer.js:58:14
    at /usr/local/lib/node_modules/modulus/node_modules/demeteorizer/node_modules/async/lib/async.js:551:21
    at /usr/local/lib/node_modules/modulus/node_modules/demeteorizer/node_modules/async/lib/async.js:227:13
    at iterate (/usr/local/lib/node_modules/modulus/node_modules/demeteorizer/node_modules/async/lib/async.js:134:13)
    at /usr/local/lib/node_modules/modulus/node_modules/demeteorizer/node_modules/async/lib/async.js:145:25
    at /usr/local/lib/node_modules/modulus/node_modules/demeteorizer/node_modules/async/lib/async.js:229:17
    at /usr/local/lib/node_modules/modulus/node_modules

Allow specifying the app name in generated package.json

In my case, the meteor app is rooted in the "app" folder of the project, so the resulting demeteorized app is called "app", which is not optimal as I have to correct package.json by hand or process it with sed each time I run demeteorizer.

Add support for the --release flag

Currently bundle is called directly, which will use the latest version of Meteor. Add support to pass the --release flag to the bundle command so versions other than the latest can be used.

Something like demeteorizer --release 0.6.4.1

Syntax error in demeteorizer.js:251:32 after finding dependencies

The issue appears on Windows 8. Seems to work fine on MacOS (both on 0.8.3)

D:\tmp> meteor create --example leaderboard
leaderboard: created.

To run your new app:
cd leaderboard
meteor
D:\tmp> cd .\leaderboard
D:\tmp\leaderboard> demeteorizer
Input: D:\tmp\leaderboard
Output: D:\tmp\leaderboard.demeteorized
Determining Meteor version...
Meteor version: 0.8.3

Bundling Meteor App...
meteor bundle generation complete.
Finding dependencies...

undefined:0

^
SyntaxError: Unexpected end of input
at Object.parse (native)
at C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\demeteorizer.js:251:32
at Array.forEach (native)
at Demeteorizer.findDependenciesInFolder (C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\demeteorizer.js:228:9)
at C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\demeteorizer.js:246:14
at Array.forEach (native)
at Demeteorizer.findDependenciesInFolder (C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\demeteorizer.js:228:9)
at C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\demeteorizer.js:246:14
at Array.forEach (native)
at Demeteorizer.findDependenciesInFolder (C:\Users\user\AppData\Roaming\npm\node_modules\demeteorizer\lib\d
emeteorizer.js:228:9)

remove npm package during Demeteorizer.prototype.findDependencies

npm is not needed as a dependency since it's included with node... and now it's hanging up npm install after a demeteorizer because current is 1.3.2 (for 10.x branch) and the package.json is asking for 1.2.2 which causes a failure on npm install.

The fix would be to watch incoming dependencies during folder search and if it was npm, to drop it.

There may be a cleaner way, but I'm working on a fix now.

package.json shows "mongodb": "1.3.7-meteor"

background

I'm trying to use demeteorizer with codeship.io, which doesn't give me sudo (to install meteor) so I have to use git clone https://github.com/meteor/meteor.git ~/meteor to use meteor, which causes a few things to act differently during bundle.

First run of demeteorizer gives me this:

It's the first time you've run Meteor from a git checkout.
I will download a kit containing all of Meteor's dependencies.
Installed dependency kit v0.3.6 in dev_bundle.

=> Running Meteor from a checkout -- overrides project version (0.6.4)`

issue

I'm assuming it's the dev_bundle dependency kit which causes npm install (post bundle) to fail, which is somehow picking up the mongodb version with "1.3.7-meteor".

This is what demeteorizer puts in package.json

"mongodb": "1.3.7-meteor"

Once that's in the package.json any npm install will fail.

resolution

not sure what the core issue is: faulty meteor, faulty demeteorizer, etc.

workaround

Workaround is to use sed to remove -meteor afterward:

sed -i.bak s/-meteor// package.json

Bundle Error

Found smart.json file, switching to Meteorite bundle.
ERROR: /bin/sh: -c: line 0: syntax error near unexpected token `)'

I don't know how to solve it

Accommodate meteorite packages

First off, thanks for this idea. 2nd, I'm rather new to meteor, so these are suggestions on how allowing meteorite packages might work. I'd be happy to submit a pull request if you'd take it.

maybe detect if smart.json exist in app root, if so then call mrt bundle rather then meteor bundle.

include 'smart.json' or 'smart.lock' in your 'package.json' build.

Presence of .meteor/release causes error code

I'm trying to deploy a package to Modulus.io, which uses the demeteorizer package. There is a version of Meteor specified through smart.json. However, when I have the .meteor/release file, demeteorizer throws an error

Done installing smart packages

Ok, everything's ready. Here comes Meteor!


=> Running Meteor from a checkout -- overrides project version (0.8.1.2)

[Error] => Running Meteor from a checkout -- overrides project version (0.8.1.2)

which causes Modulus to abort the deploy. When I delete / rename the .meteor/release file, this error is no longer there.

Wrong generated version of css-parse package (Meteor 0.8.1)

I was trying to demeteorize my app which uses Meteor 0.8.1.

After running "npm install" in generated app i received error: "Error: version not found: 2.0.0 : css-parse/2.0.0". And indeed, the latest version of css-parse package is 1.7.0 (as for today).

In Meteor, the css-parse package is referenced in: https://github.com/meteor/meteor/blob/5676dab4cc2d3f703386a14bf3ebdb1eac3c6838/packages/minifiers/package.js. The link points to the package which is in version 2.0.0 (however, the filename says it is 1.7.0).

IMO, the generated package.json should contain the same link as in packages/minifiers/package.js.

I looked at css-parse repo. They changed version from 1.7.0 to 2.0.0 about 3 months ago as a prepartion for new release but they never released.

Meteorite bundle failure

I am having some issues getting mrt demeteorizer to work. I got this error after running with both '-n' version and with the sudo command. It might have to do with meteorite

mrt bundle generation complete.
Extracting bundle.
ERROR: Error: Command failed: tar: Error opening archive: Failed to open

events.js:74 throw TypeError('Uncaught, unspecified "error" event.');

I'm trying it inside a container

# demeteorizer --version
1.0.2
# node -v               
v0.10.29

# demeteorizer 
Input: /meteor-sharejs/demo
Output: /meteor-sharejs/demo/.demeteorized
Determining Meteor version...

events.js:74
        throw TypeError('Uncaught, unspecified "error" event.');
              ^
TypeError: Uncaught, unspecified "error" event.
    at TypeError (<anonymous>)
    at emit (events.js:74:15)
    at /usr/local/lib/node_modules/demeteorizer/lib/demeteorizer.js:113:12
    at ChildProcess.exithandler (child_process.js:651:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Socket.<anonymous> (child_process.js:968:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Package demeteorized meteor app with node-webkit?

Meteor is pretty awesome and so is demeteorizer to help deploy meteor app anywhere. Even more more tempting is the ability to run a demeteorized app to node-webkit.

I have been trying to run a demeteorized meteor app on node-webkit but been running into issues.
Has someone tried doing it? Any success? An example will be really appreciated.

Thanks in advance

ReferenceError: require is not defined

I've installed demeteorizer (npm -g install demeteorizer).
I haven't even run it yet.

I started my Meteor app as usual and now I get the following error:

=> Meteor server running on: http://localhost:3000/
W2037-11:31:19.006(1)? (STDERR) /Users/tanis/.meteor/tools/0b2f28e18b/lib/node_modules/fibers/future.js:173
W2037-11:31:19.057(1)? (STDERR) throw(ex);
W2037-11:31:19.057(1)? (STDERR) ^
W2037-11:31:19.058(1)? (STDERR) ReferenceError: require is not defined
W2037-11:31:19.058(1)? (STDERR) at app/node_modules/demeteorizer/node_modules/fs-tools/lib/fs-tools.js:12:23
W2037-11:31:19.058(1)? (STDERR) at app/node_modules/demeteorizer/node_modules/fs-tools/lib/fs-tools.js:741:3
W2037-11:31:19.058(1)? (STDERR) at /Users/tanis/Documents/soulvenir-meteor/.meteor/local/build/programs/server/boot.js:154:10
W2037-11:31:19.059(1)? (STDERR) at Array.forEach (native)
W2037-11:31:19.059(1)? (STDERR) at Function..each..forEach (/Users/tanis/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:79:11)
W2037-11:31:19.059(1)? (STDERR) at /Users/tanis/Documents/soulvenir-meteor/.meteor/local/build/programs/server/boot.js:81:5
=> Exited with code: 8

idea: allow output overwrite for proper git use and git push deployments

Many node deployment systems use git. The current demeteorizer requires a new output folder to be created on each use, preventing the ability to make the demeteorizer directority a git enabled location for tracking changes and pushing via git to deployment systems.

I get that meteor bundle and demeteorizer are usually meant to create temp (disposable) copies of meteor code, but what about the following idea:

User Story: Workflow for Deploying to Azure, Pushing to github, etc.

  • I have my app in /app. It's in source control like normal
  • I have run demeteorizer -o ../appDeploy once
  • Then add /appDeploy to source control and make first commit. I can then deploy to various source-control-enabled deployment systems.
  • I then make changes in /app and want to redeploy the updates with demeteorizer using my existing appDeploy git repo. Today this step won't work.

Additional Demeteorizer Functionality

  • add a demeteorizer option -w --overwrite
  • It will then not delete the directory first, or complain about it's existence.
  • It will somehow overwrite all files.
  • I can then add another source control commit to /appDeploy and track it's changes, allowing another push to Azure, github, etc.

Note: I tried to add this functionality myself with tar, mv, cp, etc. I couldn't get it to work. Basically we need to "copy directories and all subfiles and directories to existing directory and silently overwrite all subfiles and directories". That's the only step I'm missing for this feature.

Demeteorizer does not finish his job on his very first time

I made a deploy script to be executed on fresh virtual machines that installs node, npm, meteorite and demeteorizer. However, when running demeteorizer on my code for the very first time it does not complete its tasks, giving me an empty .demeteorized folder in such way that I need to run it again to have the job done.

The output seems fine. Demeteorizer install dependencies and stops.

First run:

Input: /tmp/source
Output: /tmp/source/.demeteorized
Creating output folder.
Bundling Meteor App...
Found smart.json file, switching to Meteorite bundle.

Stand back while Meteorite does its thing

Installing Meteor

  branch: https://github.com/meteor/meteor.git#master

Installing smart packages

Downloading Meteor development bundle
โœ“ router
    tag: https://github.com/tmeasday/meteor-router.git#v0.5.4.1
 (...)
Done installing smart packages

Ok, everything's ready. Here comes Meteor!

compileLess: updating npm dependencies -- less...
 (...)

######################################################################## 100.0%

Subsequent runs:

Input: /tmp/source
Output: /tmp/source/.demeteorized
Bundling Meteor App...
Found smart.json file, switching to Meteorite bundle.

Stand back while Meteorite does its thing

Done installing smart packages

Ok, everything's ready. Here comes Meteor!


mrt bundle generation complete.
Extracting bundle.
Extraction complete.
Finding dependencies...
35 dependencies found.
Creating package.json file.
package.json file generation complete.
Setting minimum node version to v0.8.24
Deleting node_modules folders.
Deleting bundle tar.gz file.
Demeteorization complete.

two improvements to make demeteorizer flawless

Hi,
Demeteorizer is working great, and needs just two things to be painless and flawless.

First, user has to manually delete the node_modules directory:

sudo rm -rf ./server/node_modules/

Second, user has to edit package.json, and manually add the following dependencies:

sudo nano package.json
>    "sockjs": "0.3.4",
>    "websocket": "1.0.7",
>    "mongodb": "1.2.13",
>    "mailcomposer": "0.1.15"

Just giving some feedback to make Demeteorizer as great as it can be. Getting real close to being painless and flawless.
-a

Replicaset appear to cause problems

Using a replicaset with the followig syntax: mongodb://x.example.org:27017,y.example.org:27017,z.example.org:27017/admin?replicaSet=myset after a while (after switching the primary?) results in:

/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/server.js:481
        throw err;
              ^
TypeError: Cannot read property 'addresses' of undefined
    at ReplSet.processIsMaster (/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/repl_set/repl_set.js:490:28)
    at /home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/repl_set/strategies/ping_strategy.js:223:35
    at /home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/db.js:1037:18
    at /home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/db.js:1647:9
    at Server.Base._callHandler (/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/base.js:378:7)
    at /home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/server.js:468:18
    at MongoReply.parseBody (/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:137:5)
    at null.<anonymous> (/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/server.js:426:20)
    at EventEmitter.emit (events.js:95:17)
    at null.<anonymous> (/home/reezer/zoomsquare_website/meteor/.demeteorized/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)

error when running npm install

got this error during npm install

324 error Error: version not found: 1.3.7-meteor : mongodb/1.3.7-meteor
324 error at RegClient. (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
324 error at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/index.js:148:22)
324 error at Request.EventEmitter.emit (events.js:98:17)
324 error at Request. (/usr/lib/node_modules/npm/node_modules/request/index.js:876:14)
324 error at Request.EventEmitter.emit (events.js:117:20)
324 error at IncomingMessage. (/usr/lib/node_modules/npm/node_modules/request/index.js:827:12)
324 error at IncomingMessage.EventEmitter.emit (events.js:117:20)
324 error at _stream_readable.js:910:16
324 error at process._tickCallback (node.js:415:13)
325 error If you need help, you may report this log at:
325 error http://github.com/isaacs/npm/issues
325 error or email it to:
325 error [email protected]
326 error System Linux 3.2.0-40-virtual
327 error command "/usr/bin/node" "/usr/bin/npm" "install"
328 error cwd /home/ubuntu/bike_alarm_conv
329 error node -v v0.10.13
330 error npm -v 1.3.2

Document how to find the MongoDB URL

I'm a bit new to MongoDB so forgive me if I'm missing something obvious. When I run a normal Meteor instance, Meteor itself handles starting up Mongo and the Mongo hostname and such.

However, when I run demeteorizer I think I need to setup MongoDB myself and provide the hostname, port, username, and password. Is that correct?

Unless it's too far outside the scope of this tool, I think it would be helpful to provide some explanatory documentation (or link) on how to set that up. I'm stuck right now and I can't figure out

Add arbitrary data to generated package.json

Add some way to include JSON data that will be merged into the generated package.json. This could be something like merging fields from the local package.json or taking JSON data from a command.

Related to #60

Googleapis npm bug

Hi,

There seems to be an issue running demeteorizer when a meteor package is dependent on the googleapis npm package (https://npmjs.org/package/googleapis).

We have created a public repo with a sample meteor app that replicates the bug:

https://github.com/lavaina/demeteorizer-googleapis-bug

The problem seems to be with compressed files that are included in the bundle created by meteor that include extended tar headers and when demeteorizer tries to extract the bundled tar created by meteor, it fails, even though the tar extraction is completed successfully with those type of errors.

You can see the output of both demetorizer and running tar extraction manually from the command line in the repo we created:

https://github.com/lavaina/demeteorizer-googleapis-bug/tree/master/logs

Specifically, googleapis is dependent on the uglify-js npm package which includes those compressed files with the extended tar headers.

What we recommend is to ignore in demetorizer errors of this type during tar extraction.

The LaVaina.com Team

specified meteor.settings

Hi,

is it possible to demetorize and deploy app using specified settings.json file ?
like deploy --settings settings.json

thx in advance,
G.P.

Error: Cannot find module 'fibers'

The Demeteorized app does not run and gives a cannot find module 'fibers' error.
Steps to reproduce:

  1. meteor create --example leaderboard
  2. npm install -g demeteorizer
  3. cd leaderboard
  4. demeteorizer
Input: /myfolder/leaderboard
Output: /myfolder/leaderboard/.demeteorized
Creating output folder.
Bundling Meteor App...
meteor bundle generation complete.
Extracting bundle.
Extraction complete.
Finding dependencies...
21 dependencies found.
Creating package.json file.
package.json file generation complete.
Setting minimum node version to v0.8.18
Deleting node_modules folders.
Deleting bundle tar.gz file.
Demeteorization complete.
  1. cd .demeteorized
  2. node main.js
module.js:340
    throw err;
          ^
Error: Cannot find module 'fibers'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/myfolder/leaderboard/.demeteorized/server/server.js:3:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

I am unsure why this is happening though....

Bundle warnings are treated as errors

If you're not using the latest version of Meteor it prints a warning to stderr, which is interpreted as an error and prevents the process from completing. Probably need to add a flag to ignore bundle errors.

aws-sdk-browser-builder added to package.json

demeteorizer adds "aws-sdk-browser-builder" to package.json. This package does't seem to exist, causing build to fail on deployment server (openshift in my case). Upon removing the following line from packages.json followed by a git push to openshift build succseeds and app is working fine.

"aws-sdk-browser-builder": "0.0.1",

I assume this i because aws-sdk is included as a dependency of cfs:s3 meteor package. However seems to work fine without the "browser-builder" package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.