scott113341 / npm-install-version

Installs node modules to versioned or custom directories.
MIT License
56 stars 11 forks source link

"No such file or directory" in Mac #22

Closed andersonba closed 7 years ago

andersonba commented 7 years ago
./node_modules/.bin/niv 'mystique@2.0.0-rc.10'
mkdir: no such file or directory: /Users/andersonba/test-project/node_modules/.npm-install-version-temp/node_modules/mystique
mv: no such file or directory: /Users/andersonba/test-project/node_modules/.npm-install-version-temp/node_modules/mystique
Installed mystique@2.0.0-rc.10 to /Users/andersonba/test-project/node_modules/mystique@2.0.0-rc.10
macOS Sierra 10.12.1
node v6.2.0
npm 3.8.9

But works in Ubuntu using Docker

scott113341 commented 7 years ago

Thanks for the bug report @andersonba!

Looks like @obartra had the same issue and applied this fix: https://github.com/obartra/npm-install-version/commit/1774b8e37294906afd052883695a722356a53664

That fix is merged in #23 and released in v6.0.0. Let me know if this works (or not) for you!

andersonba commented 7 years ago

@scott113341 Works now!!! 👏 Thank you!

scott113341 commented 7 years ago

Great, thanks again @andersonba for the bug report!

obartra commented 7 years ago

Oh hey, just to add my two cents, I thought that was the issue I was hitting too but it was unrelated. Installing ssim.js was failing on my machine because I didn't have the node-canvas dependencies needed.

niv wasn't catching the installation error so it thought it succeeded and swallowed the npm i error.

Once I fixed my dependencies niv worked perfectly for me.

scott113341 commented 7 years ago

Thanks @obartra, I will look into the issue you were having. Even though it might make sense that niv fails in that case, it shouldn't do so silently. Investigating in #24