Avoid colons when manually installing Meteor packages

I ran into a difficult-to-google problem today:

daymeter:accounts-todoist: updating npm dependencies -- todoist...
/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: ENOENT: no such file or directory, rename '/home/kevin/code/meteor/apps/daymeter/app/packages/daymeter_accounts-todoist/.npm/package-new-1qxl97s.31js' -> '/home/kevin/code/meteor/apps/daymeter/app/packages/daymeter:accounts-todoist/.npm/package'
    at Object.renameSync (fs.js:797:3)
    at /home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1641:23
    at attempt (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1726:9)
    at Promise.catch.cp_r.preserveSymlinks (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1738:5)
    at new Promise (<anonymous>)
    at rename (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1719:10)
    at Object.renameDirAlmostAtomically (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1076:7)
    at completeNpmDirectory (/tools/isobuild/meteor-npm.js:811:9)
    at createFreshNpmDirectory (/tools/isobuild/meteor-npm.js:768:3)
    at Object.meteorNpm.updateDependencies (/tools/isobuild/meteor-npm.js:117:7)
    at Object.compile (/tools/isobuild/compiler.js:128:19)
    at /tools/isobuild/isopack-cache.js:354:30
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at IsopackCache._loadLocalPackage (/tools/isobuild/isopack-cache.js:309:18)
    at /tools/isobuild/isopack-cache.js:243:16
    at Function.time (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:284:12)
    at /tools/isobuild/isopack-cache.js:242:17
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at IsopackCache._ensurePackageLoaded (/tools/isobuild/isopack-cache.js:233:20)
    at /tools/isobuild/isopack-cache.js:75:14
    at /tools/packaging/package-map.js:57:7
    at Function.each (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore-node-f-pre.js:1321:7)
    at exports.PackageMap.eachPackage (/tools/packaging/package-map.js:49:7)
    at IsopackCache.buildLocalPackages (/tools/isobuild/isopack-cache.js:74:24)
    at /tools/project-context.js:961:25
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._buildLocalPackages (/tools/project-context.js:960:18)
    at /tools/project-context.js:365:9
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._completeStagesThrough (/tools/project-context.js:355:18)
    at /tools/project-context.js:347:12
    at Function.run (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
    at ProjectContext.prepareProjectForBuild (/tools/project-context.js:346:13)
    at /tools/cli/commands-packages.js:2291:20
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Command.func (/tools/cli/commands-packages.js:2290:27)
    at /tools/cli/main.js:1528:15
 => awaited here:
    at Promise.await (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at rename (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1747:6)
    at Object.renameDirAlmostAtomically (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/files.ts:1076:7)
    at completeNpmDirectory (/tools/isobuild/meteor-npm.js:811:9)
    at createFreshNpmDirectory (/tools/isobuild/meteor-npm.js:768:3)
    at Object.meteorNpm.updateDependencies (/tools/isobuild/meteor-npm.js:117:7)
    at Object.compile (/tools/isobuild/compiler.js:128:19)
    at /tools/isobuild/isopack-cache.js:354:30
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at IsopackCache._loadLocalPackage (/tools/isobuild/isopack-cache.js:309:18)
    at /tools/isobuild/isopack-cache.js:243:16
    at Function.time (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:284:12)
    at /tools/isobuild/isopack-cache.js:242:17
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at IsopackCache._ensurePackageLoaded (/tools/isobuild/isopack-cache.js:233:20)
    at /tools/isobuild/isopack-cache.js:75:14
    at /tools/packaging/package-map.js:57:7
    at Function.each (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore-node-f-pre.js:1321:7)
    at exports.PackageMap.eachPackage (/tools/packaging/package-map.js:49:7)
    at IsopackCache.buildLocalPackages (/tools/isobuild/isopack-cache.js:74:24)
    at /tools/project-context.js:961:25
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._buildLocalPackages (/tools/project-context.js:960:18)
    at /tools/project-context.js:365:9
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._completeStagesThrough (/tools/project-context.js:355:18)
    at /tools/project-context.js:347:12
    at Function.run (/home/kevin/.meteor/packages/meteor-tool/.2.5.0.1wy4v7o.yrnhl++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
    at ProjectContext.prepareProjectForBuild (/tools/project-context.js:346:13)
    at /tools/cli/commands-packages.js:2291:20
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Command.func (/tools/cli/commands-packages.js:2290:27)
    at /tools/cli/main.js:1528:15 {
  errno: -2,
  syscall: 'rename',
  code: 'ENOENT',
  path: '/home/kevin/code/meteor/apps/daymeter/app/packages/daymeter_accounts-todoist/.npm/package-new-1qxl97s.31js',
  dest: '/home/kevin/code/meteor/apps/daymeter/app/packages/daymeter:accounts-todoist/.npm/package'

In this example, I’m getting an Error: ENOENT: no such file or directory, rename error. Nothing is wrong with the package. The actual problem is that I have installed the package into the packages/daymeter:accounts-todoist directory. The colon in daymeter:accounts-todoist causes issues.

It is simple to solve the issue; rename the directory to use an underscore. In this case, that is daymeter_accounts-todoist.

Since it is the package.js file that determines the actual package name Meteor looks for when using meteor add, this has no effect on adding the package to the application.