iron-meteor / iron-cli

A scaffolding command line tool for Meteor applications.
640 stars 82 forks source link

"/Users/js already exists. Do you want to overwrite it?" #232

Closed jsandlund closed 7 years ago

jsandlund commented 8 years ago

I keep running into errors when running generate commands. I'm first prompted with a cryptic this file already exists message (can't find this file anywhere):

/Users/js already exists. Do you want to overwrite it? [yn]:

If I say yes, it throws an EAccess error.

image

If I sudo my way through this permission error it appears to work but no markup is generated. I've tried uninstalling & re-installing to no avail. Thoughts on what's happening?

chrisbutler commented 8 years ago

@jsandlund that's bizarre. the paths it's using don't make sense.

can you try creating a project without dashes in the name, and see if it still behaves the same way?

jsandlund commented 8 years ago

Strange. It's trying to write to the same unknown path /Users/js/ when I run iron create.

image

jsandlund commented 8 years ago

Super strange. Played around a bit more. Appears to only run into an issue when creating the .js file. Only potential cause I can think off: maybe something to do with my username being 'jsandlund', which creates a side effect when something is being parsed.

image

chrisbutler commented 8 years ago

that is quite possible, i'll try to test out some stuff when i get a chance

jsandlund commented 8 years ago

Yep, confident my alias is the root cause. Changed it last night to not be prefixed with js, same environment, and everything worked fine. I poked around the iron-cli's lib files to see if I could find the culprit but no luck. (Apologies, my node.js is super weak.)

chrisbutler commented 8 years ago

@jsandlund in that case, i'm pretty sure the issue is with rewriteSourcePathForEngine or rewriteDestinationPathForEngine and the regex-based replacing that is happening in https://github.com/iron-meteor/iron-cli/blob/master/lib/tools/file_system.js

jsec commented 8 years ago

Can confirm the alias hypothesis as well. iron create appname fails with the same error for me, with username "jsec"

chrisbutler commented 7 years ago

@jsandlund @jsec this is fixed in 1.8.0 !