ember-fastboot / fastboot-app-server

A production-ready app server for running Ember FastBoot apps
140 stars 72 forks source link

Cannot find modules when pointing to external `distPath` #87

Closed sheldonbaker closed 6 years ago

sheldonbaker commented 6 years ago

Using this minimal setup of my server:

const FastBootAppServer = require('fastboot-app-server');

let server = new FastBootAppServer({
  distPath: '../my-ember-app/dist'});

server.start();

Though my ember app runs fine on it's own (even in fastboot mode) with ember serve, my server implementation above constantly throws:

Cannot find module 'node-fetch' or Cannot find module 'moment' (used from ember-simple-auth and ember-moment, e.g.).

I have node-fetch in my app's package.json's fastbootDependencies. Is there any other setup step that I'm missing?

sheldonbaker commented 6 years ago

My bad: Once you've uploaded dist to your server, you need to run npm install inside.

Perhaps a change to the Quick Start section in the README should point out that one needs to run npm install inside of dist after doing an ember build.