[Solved] Meteor not working. The "to" argument must be of type string. Received null

It’s been a while. I’m not having luck running Meteor these days. The npm install -g meteor installed does not work (I commented in the other thread).

Using the curl/shell installer, on a fresh machine after npm installer fail, running npm uninstall -g meteor, and finally running meteor --exclude-archs web.browser.legacy in my project, it ends with this:

      throw error;

TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type string. Received null
    at validateString (internal/validators.js:120:11)
    at Object.relative (path.js:1054:5)
    at Object.wrapper [as pathRelative] (/home/trusktr/.meteor/packages/meteor-tool/.
    at isWithinProdPackage (/tools/isobuild/bundler.js:467:27)
    at isWithinProdPackage (/tools/isobuild/bundler.js:494:18)
    at /tools/isobuild/builder.js:724:15
    at Array.forEach (<anonymous>)
    at walk (/tools/isobuild/builder.js:656:34)
    at /tools/isobuild/builder.js:734:11
    at Array.forEach (<anonymous>)
    at walk (/tools/isobuild/builder.js:656:34)
    at Builder._copyDirectory (/tools/isobuild/builder.js:788:5)
    at Builder.copyNodeModulesDirectory (/tools/isobuild/builder.js:550:17)
    at /tools/isobuild/bundler.js:2482:17
    at Function._.each._.forEach (/home/trusktr/.meteor/packages/meteor-tool/.
    at JsImage.write (/tools/isobuild/bundler.js:2439:7)
    at ServerTarget.write (/tools/isobuild/bundler.js:2694:13)
    at /tools/isobuild/bundler.js:2861:30
    at /tools/isobuild/bundler.js:3000:11
    at Array.forEach (<anonymous>)
    at /tools/isobuild/bundler.js:2995:26
    at /tools/isobuild/bundler.js:3355:22
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at bundle (/tools/isobuild/bundler.js:3169:31)
    at /tools/isobuild/bundler.js:3113:32
    at Slot.withValue (/home/trusktr/.meteor/packages/meteor-tool/.
    at Object.withCache (/home/trusktr/.meteor/packages/meteor-tool/.
    at Object.bundle (/tools/isobuild/bundler.js:3113:16)
    at /tools/runners/run-app.js:572:24
    at Function.run (/home/trusktr/.meteor/packages/meteor-tool/.
    at bundleApp (/tools/runners/run-app.js:571:34)
    at AppRunner._runOnce (/tools/runners/run-app.js:617:35)
    at AppRunner._fiber (/tools/runners/run-app.js:931:28)
    at /tools/runners/run-app.js:401:12 {

I’ve tried meteor reset, deleting node_modules, etc, but it just won’t work.

Ok, finally some combination of removing stuff and starting over worked.

Why does this happen though? I don’t think it should happen at all.

I already had this problem once and reinstalling from scratch worked.

If this starts to happen more often we should investigate what is causing it.