zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 281 forks source link

Can't find file star.json #1240

Closed Floriferous closed 3 years ago

Floriferous commented 3 years ago

Just saw this error when deploying. It's trying to find the star.json file in getNodeVersion.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type object
    at Object.stat (fs.js:887:10)
    at proj/node_modules/tar/lib/list.js:115:8
    at new Promise (<anonymous>)
    at listFile (proj/node_modules/tar/lib/list.js:111:13)
    at Object.module.exports (proj/node_modules/tar/lib/list.js:42:18)
    at proj/node_modules/mup/lib/plugins/meteor/utils.js:259:18
    at new Promise (<anonymous>)
    at readFileFromTar (proj/node_modules/mup/lib/plugins/meteor/utils.js:258:10)
    at getNodeVersion (proj/node_modules/mup/lib/plugins/meteor/utils.js:113:20)
    at prepareBundleLocally (proj/node_modules/mup/lib/plugins/meteor/prepare-bundle.js:63:55)
    at Object.push [as handler] (proj/node_modules/mup/lib/plugins/meteor/command-handlers.js:165:52)
    at async PluginAPI.runCommand (proj/node_modules/mup/lib/plugin-api.js:135:9)
    at async PluginAPI.runCommand (proj/node_modules/mup/lib/plugin-api.js:135:9)
    at async PluginAPI._runHooks (proj/node_modules/mup/lib/plugin-api.js:78:13)
    at async PluginAPI._runPostHooks (proj/node_modules/mup/lib/plugin-api.js:113:9)
    at async PluginAPI.runCommand (proj/node_modules/mup/lib/plugin-api.js:140:7)

proj/node_modules/shelljs/src/common.js:401
      if (config.fatal) throw e;

If I call mup directly in my shell it works, however if I call it through our node script with shelljs I can see the error. Isn't there a better way to determine the node version?

This happens on 1.5.3.

Floriferous commented 3 years ago

On our CI we see the same error, but a bit different:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of PluginAPI

CyberCyclone commented 3 years ago

I'm having the same issue. Doing meteor deploy on Node version 12 produced the first error. I've updated to the latest LTS (Node 14.17.1) and it's giving me the second error (Received an instance of PluginAPI).