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

Meteor 1.3 app works locally but is broken after deploy #141

Closed
monvillalon opened this issue Aug 13, 2016 · 18 comments
Closed

Meteor 1.3 app works locally but is broken after deploy #141

monvillalon opened this issue Aug 13, 2016 · 18 comments

Comments

@monvillalon
Copy link

monvillalon commented Aug 13, 2016

I have a meteor 1.3 that runs perfectly locally by either meteor run or meteor build but when deploying to modulus with modulus deploy demeteorizer warns that "Unable to resolve some modules:", after a successful deploy react the error I'm seeing is that react is not found.

My versions are:
meteor 1.3.4.1
modulus-cli 6.1.1
node v6.3.0
npm 3.10.7

Relevant output:

Demeteorizing application...

Unable to resolve some modules:

  "react" in /mnt/input/client/App.jsx (web.browser)
  "react-dom" in /mnt/input/client/index.jsx (web.browser)
  "react-router" in /mnt/input/client/App.jsx (web.browser)
  "lodash" in /mnt/input/client/pages/SamplesListPage.jsx (web.browser)
  "material-ui/FloatingActionButton" in
/mnt/input/client/components/Pagination/Pagination.jsx (web.browser)
  "material-ui/svg-icons/navigation/chevron-left" in
/mnt/input/client/components/Pagination/Pagination.jsx (web.browser)
  "material-ui/svg-icons/navigation/chevron-right" in
/mnt/input/client/components/Pagination/Pagination.jsx (web.browser)
  "fixed-data-table" in /mnt/input/client/pages/SamplesListPage.jsx
(web.browser)
  "moment" in /mnt/input/client/pages/SamplesListPage.jsx (web.browser)
  "formsy-react" in /mnt/input/client/pages/AccountModal.jsx (web.browser)
  "formsy-material-ui/lib" in /mnt/input/client/pages/AccountModal.jsx
(web.browser)
  "material-ui/RaisedButton" in /mnt/input/client/pages/AccountModal.jsx
(web.browser)
  "material-ui/FlatButton" in /mnt/input/client/pages/AccountModal.jsx
(web.browser)
  "material-ui/FontIcon" in /mnt/input/client/pages/AccountModal.jsx
(web.browser)
  "material-ui/List" in /mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/styles/MuiThemeProvider" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/svg-icons/action/home" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/svg-icons/communication/speaker-phone" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/svg-icons/image/healing" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/svg-icons/social/group" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/svg-icons/action/build" in
/mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "material-ui/Divider" in /mnt/input/client/layouts/AppLayout.jsx (web.browser)
  "react-modal" in /mnt/input/client/pages/AccountsPage.jsx (web.browser)
  "material-ui/Chip" in /mnt/input/client/pages/SamplesListPage.jsx
(web.browser)
  "material-ui/TextField" in /mnt/input/client/pages/SamplesListPage.jsx
(web.browser)
  "react-tap-event-plugin" in /mnt/input/client/index.jsx (web.browser)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save react react-dom react-router lodash material-ui
fixed-data-table moment formsy-react formsy-material-ui react-modal
react-tap-event-plugin


Unable to resolve some modules:

  "regularity" in /mnt/input/server/publications/searchQuery.js
(os.linux.x86_64)
  "aws-sdk" in /mnt/input/server/routes.js (os.linux.x86_64)
  "dotenv" in /mnt/input/server/main.js (os.linux.x86_64)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save regularity aws-sdk dotenv
@jbrozena22
Copy link

+1 Having this exact same problem

@gary-menzel
Copy link

Also an issue for me - different files but the same problem.

With 'react' - it deploys the app and then cannot find 'react' when running on modulus. Works fine locally.

e.g.

Unable to resolve some modules:
"react" in /mnt/input/imports/components/test/step4.jsx (web.browser)
...
"react-dom" in /mnt/input/client/layouts/UserLayout.jsx (web.browser)
...
"react-mounter" in /mnt/input/client/routes.jsx (web.browser)

[etc.]

Same notice about npm install - but that change nothing (and it works fine locally).

Meteor 1.3.2.4
Modulus CLI 6.2.0

@fiveisprime
Copy link

Did you try the suggestion from the error message?

If you notice problems related to these missing modules, consider running:

  meteor npm install --save react react-dom react-router lodash material-ui
fixed-data-table moment formsy-react formsy-material-ui react-modal
react-tap-event-plugin


Unable to resolve some modules:

  "regularity" in /mnt/input/server/publications/searchQuery.js
(os.linux.x86_64)
  "aws-sdk" in /mnt/input/server/routes.js (os.linux.x86_64)
  "dotenv" in /mnt/input/server/main.js (os.linux.x86_64)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save regularity aws-sdk dotenv

@monvillalon
Copy link
Author

@fiveisprime of course, remember that the app works perfectly locally, so the packages are there. The only difference I can see between meteor build locally and modulus is the architecture, since Im using osx.

@monvillalon
Copy link
Author

Sorry accidentally closed the issue

@monvillalon monvillalon reopened this Aug 15, 2016
@jbrozena22
Copy link

@fiveisprime Yes, the issue is that error message is showing up from the build, which is occurring on the Modulus machine. So even if you wanted to run that command, you don't have access to the Modulus server to do so.

And like @monvillalon , those errors are not showing up locally, and the correct npm_modules are loaded as you would expect.

@fiveisprime
Copy link

It's failing to build on the server because those packages aren't saved for your project's config. You don't need to run those commands on the server, you need to run them before deploying so it's all saved, right? The --save portion of the command will handle making sure that it's all there when you deploy (I'm going based on my knowledge of node/npm).

The project will run locally just like a node project would if you ran $ npm install react without --save then deploy to Modulus. The module would be installed locally, but the Modulus build server would have no knowledge of it at build time.

@monvillalon
Copy link
Author

@fiveisprime If I understand you correctly you are saying that this might be caused by not having the relevant packages on package.json. But they are there.

...
  "dependencies": {
    "aws-sdk": "^2.5.0",
    "bluebird": "^3.4.1",
    "dotenv": "^2.0.0",
    "fixed-data-table": "^0.6.3",
    "formsy-material-ui": "^0.4.3",
    "formsy-react": "^0.18.1",
    "lodash": "^4.15.0",
    "material-ui": "^0.15.4",
    "meteor-node-stubs": "~0.2.0",
    "moment": "^2.14.1",
    "react": "^15.3.0",
    "react-addons-css-transition-group": "^15.3.0",
    "react-addons-linked-state-mixin": "^15.3.0",
    "react-addons-perf": "^15.3.0",
    "react-addons-pure-render-mixin": "^15.2.1",
    "react-addons-test-utils": "^15.3.0",
    "react-addons-update": "^15.3.0",
    "react-dom": "^15.3.0",
    "react-modal": "^1.4.0",
    "react-query-builder": "0.0.4",
    "react-router": "^2.6.1",
    "react-tap-event-plugin": "^1.0.0",
    "regularity": "^0.5.1"
  }
}

@fiveisprime
Copy link

What's your project ID?

@monvillalon
Copy link
Author

What is also weird is that two days before it worked.

@jbrozena22
Copy link

Same here - all of those modules are saved in my package.json.

@monvillalon
Copy link
Author

@fiveisprime I have since deleted the app, and moved it to another provider since this was a time sensitive issue. I will recreate the app later today and will put the id here.

@jbrozena22
Copy link

My app ID is Pairprep. I also switched hosting providers this weekend due to this issue, but I'm redeploying now to Modulus and seeing the same issue.

@gary-menzel
Copy link

I too have tried all the suggestions from the error message - including completely removing node_modules and running 'npm install' again (fyi: that means it looks at package.json and downloads all the listed files again to recreate node_modules). The local build continues to work without issue.

I also downloaded Demeteorizer, ran it manually, created a bundle and it ran perfectly fine locally. I then attempted to zip up the demeteorized version of the app and deploy it as a NodeJS application (I created another project from scratch). That had too many different errors (I suspect that is why Modulus created the MeteorJS container to cater for differences in Meteor 1.3).

@fiveisprime - you reset one of my projects for me that was stuck uploading [neither project has this problem set of build files now but I can attempt to deploy again if it will be of any assistance - which will be about another 8-9 hours away before I can attempt this; as at posting].

I am in a similar situation to @monvillalon - I need to keep moving forward and can't really be bogged down dealing with hosting issues (if I were going to do that, I'd build my own VM from the ground up). So, I am going to have to look at other alternatives if this can't be resolved soon.

In my case, the project was last successfully deployed 7 days before this issue occurred and worked fine then.

@fvpDev
Copy link

fvpDev commented Aug 16, 2016

+1 ... same problems with meteor@1.4+

@gary-menzel
Copy link

I did not redeploy. I was requested by my client to look into other hosting (which immediately worked without issue). I am somewhat disappointed because Modulus looked like a very good option for a startup but it's Meteor.... so (price notwithstanding) there's a fairly clear "pain free" choice which only took an hour to run up and confirm and another hour to create an alternative MongoDB account, grab a DB backup, and restore (good exercise to do before launching into Production).

CLOSED - from my perspective.

@fvpDev
Copy link

fvpDev commented Aug 16, 2016

About to switch over to MDG's Galaxy myself...there seems to disappointingly be a new issue with modulus every single time there is an update to either node or meteor.

@jackboberg
Copy link
Contributor

I've created a new issue specifically targeting missing dependencies on the docker-run-meteor repo. Since this does not appear to be a CLI issue, I am closing this and picking up support over there.

To everyone who is experiencing issues, we understand your frustration and are trying our best to resolve the situation. We want everyone to be able to run the newest version(s), but we need to maintain compatibility for those with apps running older versions as well. Meteor 1.3.x and 1.4.x have been especially difficult in that regard.

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

6 participants