[Solved] Wiped HD, how restore project from latest Git commit?

I’m trying to restore and re-setup a project that has been wiped from my local machine. Meteor version of project is

I don’t care about the lost content of the database while developing, but even so, the app is not starting. The latest demo app from Meteor does work though.

In general, what is the recommended procedure to re-setup an existing app (from GitHub, when everything has been wiped)?

Steps taken. App won’t start.

  1. Installed Meteor
  $ curl "https://install.meteor.com/?release=" | sh
  1. Cloned repository from GitHub to my local machine

Error message when starting the app:

c6y-mbp:rainbow c6y$ meteor
[[[[[ ~/Git/rainbow ]]]]]                     

=> Started proxy.                             
=> Meteor 1.10.2 is available. Update this project with 'meteor update'.
=> Started MongoDB.                                                             
W20200624-12:44:07.656(-7)? (STDERR) /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:475
W20200624-12:44:07.677(-7)? (STDERR) }).run();
W20200624-12:44:07.678(-7)? (STDERR)    ^
W20200624-12:44:07.678(-7)? (STDERR) 
W20200624-12:44:07.678(-7)? (STDERR) Error: Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault'
W20200624-12:44:07.678(-7)? (STDERR)     at Function.Module._resolveFilename (module.js:547:15)
W20200624-12:44:07.678(-7)? (STDERR)     at Function.resolve (internal/module.js:18:19)
W20200624-12:44:07.678(-7)? (STDERR)     at Object.require (/Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:288:32)
W20200624-12:44:07.679(-7)? (STDERR)     at makeInstallerOptions.fallback (packages/modules-runtime.js:604:18)
W20200624-12:44:07.679(-7)? (STDERR)     at Module.require (packages/modules-runtime.js:230:14)
W20200624-12:44:07.679(-7)? (STDERR)     at require (packages/modules-runtime.js:244:21)
W20200624-12:44:07.679(-7)? (STDERR)     at livedata_connection.js (/Users/c6y/Git/rainbow/.meteor/local/build/programs/server/packages/ddp-client.js:147:30)
W20200624-12:44:07.679(-7)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:322:7)
W20200624-12:44:07.679(-7)? (STDERR)     at Module.require (packages/modules-runtime.js:224:14)
W20200624-12:44:07.679(-7)? (STDERR)     at require (packages/modules-runtime.js:244:21)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

I’ve also tried updating the project to the latest version of Meteor, but got this error:
Unexpected mongo exit code 62

Rainbow app on GitHub: Link

Thanks for any help!

Did you run meteor npm i to pull in all the node modules required?


Thanks @jamgold — I did run $ meteor npm i from within the app directory. App is not starting yet, but the error has changed:

Running $ meteor npm i:

$ meteor npm i
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
added 1 package and updated 2 packages in 1.795s
[+] no known vulnerabilities found [100 packages audited]

Starting the app, now getting a different error:

$ meteor
[[[[[ ~/Git/rainbow ]]]]]                     

=> Started proxy.                             
=> A patch (Meteor for your current release is available!
   Update this project now with 'meteor update --patch'.
=> Started MongoDB.                           
W20200624-17:17:25.847(-7)? (STDERR) /Users/c6y/.meteor/packages/meteor-tool/.1.7.0_3.w8zcf.uowlh++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20200624-17:17:25.885(-7)? (STDERR) 						throw(ex);
W20200624-17:17:25.885(-7)? (STDERR) 						^
W20200624-17:17:25.885(-7)? (STDERR) 
W20200624-17:17:25.885(-7)? (STDERR) TypeError: Cannot read property 'rootURL' of undefined
W20200624-17:17:25.886(-7)? (STDERR)     at sitemaps.js (server/sitemaps.js:30:55)
W20200624-17:17:25.886(-7)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:322:7)
W20200624-17:17:25.886(-7)? (STDERR)     at Module.require (packages/modules-runtime.js:224:14)
W20200624-17:17:25.886(-7)? (STDERR)     at require (packages/modules-runtime.js:244:21)
W20200624-17:17:25.886(-7)? (STDERR)     at /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/app/app.js:1737:1
W20200624-17:17:25.886(-7)? (STDERR)     at /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:411:36
W20200624-17:17:25.886(-7)? (STDERR)     at Array.forEach (<anonymous>)
W20200624-17:17:25.887(-7)? (STDERR)     at /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:220:19
W20200624-17:17:25.887(-7)? (STDERR)     at /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:471:5
W20200624-17:17:25.887(-7)? (STDERR)     at Function.run (/Users/c6y/Git/rainbow/.meteor/local/build/programs/server/profile.js:510:12)
W20200624-17:17:25.887(-7)? (STDERR)     at /Users/c6y/Git/rainbow/.meteor/local/build/programs/server/boot.js:470:11
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

Looks like you are trying to access rootUrl in your application, maybe from Meteor.settings but it is not defined. Look for it in your source code in server/sitemaps.js:30:55

1 Like

Big thanks @jamgold!! The app is up and running.

I’m embarrassed to say that I forgot to include the settings file when starting meteor: $ meteor --settings settings.json. :grimacing:

1 Like