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

Builds fail #47

Closed
ghost opened this issue Apr 20, 2017 · 9 comments
Closed

Builds fail #47

ghost opened this issue Apr 20, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Apr 20, 2017

I created a test app

  • meteor create --full test
  • then cd test
  • then meteor-now with mongo settings and etc

screen shot 2017-04-20 at 12 25 22 am

Regardless of the app I try deploy build throws this error when deploying build

@acomito
Copy link

acomito commented Apr 21, 2017

I see this error as well and I'm hanging on
[METEOR-NOW] - building meteor app (this can take several minutes)

@acomito
Copy link

acomito commented Apr 21, 2017

@ushan89 did you meteor npm install first? I had forgotten that I deleted my node_modules folder awhile back. I had deployed earlier and ran into the same error as you. I then started up my app to see if it worked locally and realized I didn't have my npm modules installed. So i meteor npm install, and then started it up locally to see if it worked. It did. Then I gave my meteor now command another try and BOOM. It deployed as expected.

I'm not sure if it was the node_modules that did it, or if starting up the meteor app downloaded the atmosphere packages, but one or the other seemed to solve the problem (I think)

@vladejs
Copy link

vladejs commented Apr 21, 2017 via email

@acomito
Copy link

acomito commented Apr 21, 2017

worked for me with METEOR@1.4.2.3

@ghost
Copy link
Author

ghost commented Apr 21, 2017

@acomito Thank you for the response. I appreciate your help.

Here is what I have tried.

meteor create --full test && cd test && meteor npm install && meteor-now -e "MONGO_URL=mongodb://user:pass@mymongodbserver:27017/mydb?eadPreference=primary&ssl=true" -e NODE_ENV=production

I create a new meteor app and try this out. I get the same error

at Promise$_rejecter (/usr/local/lib/node_modules/meteor-now/node_modules/promise-spawner/node_modules/bluebird/js/main/promise.js:590:44) at /usr/local/lib/node_modules/meteor-now/node_modules/promise-spawner/index.js:85:13

@ghost
Copy link
Author

ghost commented Apr 21, 2017

I am using Meteor 1.4.4.1

@acomito
Copy link

acomito commented Apr 21, 2017

can you try running it locally to make sure the atmosphere packages were downloaded?

my script looks like this:

meteor-now -e MONGO_URL=mongodb://myurl -e ROOT_URL=https://myurl.com -e NODE_ENV=production --settings settings-development.json

So i run meteor npm install. Then I run meteor npm start to start it locally. Then i run stop that process and run npm run now-production

{
  "name": "application-name",
  "version": "1.0.0",
  "description": "Application description.",
  "scripts": {
    "start": "meteor --settings settings-development.json",
    "test": "meteor test --driver-package practicalmeteor:mocha --port 5000",
    "chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests",
    "chimp-test": "chimp --ddp=http://localhost:3000 --mocha --path=tests",
    "now-production": "meteor-now -e MONGO_URL=mongodb://myurl -e ROOT_URL=https://myurl.com -e NODE_ENV=production --settings settings-development.json",
    "staging": "DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy staging.meteor.com --settings settings-development.json",
    "production": "DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy production.meteor.com --settings settings-production.json"
  },
  "devDependencies": {
    "chimp": "^0.34.1",
    "eslint": "^2.9.0",
    "eslint-config-airbnb": "^9.0.1",
    "eslint-plugin-jsx-a11y": "^1.2.0",
    "eslint-plugin-meteor": "^3.5.2",
    "eslint-plugin-react": "^5.1.1",
    "faker": "^3.1.0"
  },
  "eslintConfig": {
    "parserOptions": {
      "ecmaFeatures": {
        "jsx": true
      }
    },
    "plugins": [
      "meteor",
      "react"
    ],
    "extends": [
      "airbnb/base",
      "plugin:meteor/guide",
      "plugin:react/recommended"
    ],
    "globals": {
      "server": false,
      "browser": false,
      "expect": false
    },
    "rules": {
      "import/no-unresolved": 0,
      "no-underscore-dangle": [
        "error",
        {
          "allow": [
            "_id",
            "_ensureIndex",
            "_verifyEmailToken",
            "_resetPasswordToken",
            "_name"
          ]
        }
      ]
    }
  },
  "dependencies": {
    "antd": "^2.5.3",
    "aphrodite": "^1.0.0",
    "babel-plugin-import": "^1.1.0",
    "bcrypt": "^0.8.7",
    "eslint": "^2.13.1",
    "eslint-plugin-jsx-a11y": "^1.5.3",
    "eslint-plugin-react": "^5.2.2",
    "faker": "^3.1.0",
    "griddle-react": "^0.7.1",
    "indexof": "0.0.1",
    "meteor-node-stubs": "^0.2.4",
    "react": "^15.4.1",
    "react-addons-pure-render-mixin": "^15.0.2",
    "react-addons-update": "^15.4.2",
    "react-dom": "^15.2.0",
    "react-html-email": "^1.1.3",
    "react-joyride": "^1.7.0",
    "react-komposer": "^1.8.0",
    "react-router": "^2.5.2",
    "react-social-icons": "^2.5.1",
    "react-trix-editor": "^1.0.3",
    "unique-random-array": "^1.0.0"
  }
}

@ghost
Copy link
Author

ghost commented Apr 21, 2017

@acomito I now have a new problem.

I ran meteor-now with -d switch to get debug logs. My mongo server runs behind an SSL connection. This might be one reason why everything runs file if I do not specify mongo url but when I use a mongo url with SSL, the deployment fails.

`

/bundle/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: connection 0 to mymongoserver.url.com:27107
closed
at Object.wait (/bundle/programs/server/node_modules/fibers/future.js:449:15)
at new MongoConnection (packages/mongo/mongo_driver.js:211:27)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object. (packages/mongo/remote_collection_driver.js:38:10)
at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
at new Mongo.Collection (packages/mongo/collection.js:99:40)
at meteorInstall.imports.api.links.links.js (imports/api/links/links.js:5:22)
at fileEvaluate (packages/modules-runtime.js:197:9)
at Module.require (packages/modules-runtime.js:120:16)
at Module.Mp.importSync (/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:82:24)
- - - - -
at Function.MongoError.create (/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:29:11)
at Socket. (/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:200:22)
at Socket.g (events.js:291:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:501:12)

`

@ghost
Copy link
Author

ghost commented Apr 21, 2017

@acomito: sorted out my issue. It turns out it was my MONGO_URL problems.

If there is & in MONGO_URL, now is not happy.

  1. As you suggested, meteor nom install
  2. Changed my MONGO_URL=mongostring to 'MONGO_URL=mongostring' i.e. with single quotes. I do not know how this is a fix. Something is doing wrong lexical analysis with the -e option tags I guess but a topic for later.

Also if you're are active on the meteor meetup at Boston, I would love to meet you in person and pick your brain.

This issue was closed.
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