fsprojects-archive / zzarchive-generator-fsharp

[ARCHIVED] Yeoman F# generator
Apache License 2.0
62 stars 27 forks source link

Uncaught Error: ENOENT: no such file or directory, open 'C:\Users\Alfonso\.cache\yeoman\sha' #10

Closed alfonsogarciacaro closed 9 years ago

alfonsogarciacaro commented 9 years ago

I'm getting this error when trying top use the generator either from Atom or the console. Any help?

Cheers!

Krzysztof-Cieslak commented 9 years ago

Hmm, can You check out if this file really doesn't exist? If it doesn't try creating it ( just empty file with sha name)

alfonsogarciacaro commented 9 years ago

Thanks for replying so quickly, Krzysztof. The file does not exist indeed, I'm curious as to why this is not being automatically created. In my laptop the generator is working fine (both devices run Windows 8.1, btw).

Anyways, I created the empty file and now this is what I'm getting:

fs.js:939
Hide Stack Trace
TypeError: path must be a string
  at TypeError (native)
  at Object.fs.unlinkSync (fs.js:939:18)
  at [object Object].yeoman.generators.Base.extend._saveSHA (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\app\index.js:40:16)
  at yeoman.generators.Base.extend._checkSHA (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\app\index.js:49:15)
  at Request._callback (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\app\index.js:74:17)
  at Request.self.callback (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\node_modules\request\request.js:197:22)
  at emitTwo (events.js:87:13)
  at Request.emit (events.js:169:7)
  at Request.<anonymous> (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\node_modules\request\request.js:1050:14)
  at emitOne (events.js:82:20)
  at Request.emit (events.js:166:7)
  at IncomingMessage.<anonymous> (C:\Users\Alfonso\AppData\Roaming\npm\node_modules\generator-fsharp\node_modules\request\request.js:996:12)
  at emitNone (events.js:72:20)
  at IncomingMessage.emit (events.js:163:7)
  at _stream_readable.js:891:16
  at process._tickCallback (node.js:357:13)

Thanks again for your help and all your work, Krzysztof!

Krzysztof-Cieslak commented 9 years ago

sha file should be automatically created if it doesn't exist or should be recreated if newer version of templates are on GitHub ( as name suggest it just stores SHA of last commit to template branch, so i can check if re-download of templates is required)

And well, it's working on my machine™ if I remove file. The second part - after You created file - is bug indeed, fix should be online right now (version 0.4.1).

suneeth commented 9 years ago

Hi Just wanted to report that i am also getting the same error as alfonsogarciacaro mentioned.Any help is appreciated. Thanks

alfonsogarciacaro commented 9 years ago

Great! After updating now it's working :+1: If I delete the sha file it's still failing though.

It'd be nice if the FAKE build script were also automatically added to the generated project but I guess this belongs to a different issue.

Thanks again for that, @Krzysztof-Cieslak! Please feel free to close the issue if you want.

Krzysztof-Cieslak commented 9 years ago

I'll try investigate bit more why sha file is not created next week, when I'll be back in home. So leaving issue open.

taimila commented 9 years ago

I got it working by manually creating the folder ~/.cache/yeoman and after that executing the yo fsharp. So on my machine the problem seemed to be that the folder just didn't exist.

rodrigovidal commented 9 years ago

I reproduced the same here. I think that the fs.appendFileSync function doesn't recursively create directories, so it gets an error. But I'll have to investigate further.

2015-07-30 14:36 GMT-03:00 Lauri Taimila notifications@github.com:

I got it working by manually creating the folder ~/.cache/yeoman and after that executing the yo fsharp. So on my machine the problem seemed to be that the folder just didn't exist.

— Reply to this email directly or view it on GitHub https://github.com/fsprojects/generator-fsharp/issues/10#issuecomment-126412878 .

Krzysztof-Cieslak commented 9 years ago

Yep the problem was that we haven't created cache directory (actually I've assumed that yeoman will create it automatically and well.. i was wrong ;) )

Fixed in 0.4.3