OpenSourceWorkflow / generator-kickstart

[deprecated]: yeoman generator for website development
MIT License
10 stars 1 forks source link

ValidationError / Naming Error for Project Name #75

Closed stephanfriedrich closed 9 years ago

stephanfriedrich commented 9 years ago

If you set your Project Name like "Test Project" with an Backspace, you get an Error after Bower install its dependencies.

npm ERR! install Couldn't read dependencies
npm ERR! Linux 3.13.0-39-generic
npm ERR! argv "node" "/opt/node/bin/npm" "install"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.7

npm ERR! Invalid name: "Test Project"
stephanfriedrich commented 9 years ago

What if you want to name your Project like, "testproject Relaunch Website 2014/15"

stephanfriedrich commented 9 years ago

Supposed you set your name like "Test ", with tailing Backspace. Installation and grunt works fine. But if you try to run kickstart:addcomponent, this will raise an error like.

fs.js:438
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/home/projects/frontend/test/components/test .scss'
    at Object.fs.openSync (fs.js:438:18)
    at Object.fs.readFileSync (fs.js:289:15)
    at readFileAsString (/opt/node/lib/node_modules/generator-kickstart/node_modules/yeoman-generator/lib/actions/wiring.js:277:13)
    at yeoman.generators.NamedBase.extend.addStyling (/opt/node/lib/node_modules/generator-kickstart/addcomponent/index.js:130:19)
    at /opt/node/lib/node_modules/generator-kickstart/node_modules/yeoman-generator/lib/base.js:395:14
    at processImmediate [as _immediateCallback] (timers.js:345:15)
´´´
stephanfriedrich commented 9 years ago

i fixed this by editing package.json, :name . In this case i detected another Naming Validation-Error.

It should uppercase the Projectname. I get also the same error with Projectname "Test", because its capitalized and in some config files its uppercased (e.g. in bower.json uppercased, in package.json capitalized)

markusfalk commented 9 years ago

@stephanfriedrich Could you please test if the error still occurs? Thanks :)

stephanfriedrich commented 9 years ago

Now, everything is Fine. " Test Project" with leading Whitespace works, too.