chingu-voyage5 / Bears-Team-6

Add-project-description-here | Voyage-5 | chingu.io
0 stars 0 forks source link

untracked files in the bot directory #25

Open serjt12 opened 6 years ago

serjt12 commented 6 years ago

Untracked files: (use "git add ..." to include in what will be committed)

    bot/cake
    bot/cake.cmd

    bot/coffee
    bot/coffee.cmd
    bot/express
    bot/express.cmd
    bot/hubot
    bot/hubot.cmd
    bot/mime
    bot/mime.cmd
    bot/mkdirp
    bot/mkdirp.cmd
    bot/npm
    bot/npm.cmd
    bot/npx
    bot/npx.cmd
    bot/sshpk-conv
    bot/sshpk-conv.cmd
    bot/sshpk-sign
    bot/sshpk-sign.cmd
Faxn commented 6 years ago

I looked into this more. They only show up on windows and only when install is called with --prefix(even --prefix . causes them) they seem to be made for every file in node_modules/.bin.

git clean -f is an easy to delete them all, but be careful because it will delete all untracked, unignored files.

I think it's a side effect of prefix. It's trying to put links to executable files where they can be found on the path. (https://docs.npmjs.com/files/folders#prefix-configuration)

Possible solutions

  1. Just ignore the files, add them to .gitignore and move on.
  2. Change postinstall to cd in to and out of each subproject instead of using prefix, this
  3. Go back to using subpackage. It basically does 2 so it doesn't make these files.
  4. Call npm install <package> without the prefix option in postinstall. According to the docs this might hoist dependencies up to the top level node_modules so it could break things.