/ / Folder Bower Components nie ma w witrynie generowanej przez Yeomana - gruntjs, yeoman, bower, yeoman-generator

W witrynie Yeoman nie ma folderu Bower Components - gruntjs, yeoman, bower, yeoman-generator

Są to wszystkie polecenia, które uruchomiłem, na wszelki wypadek:

Wersja węzła:

> node -v

w0.10.21.

Instalowanie Siema:

> npm install -g yo

Nie było błędów ani ostrzeżeń.

Instalowanie generator-webapp:

> npm install -g generator-webapp
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.21","npm":"1.3.9"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.21","npm":"1.3.9"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.21","npm":"1.3.9"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.21","npm":"1.3.9"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.21","npm":"1.3.9"})

Tworzenie katalogu ... jak przydatne

> md wat
> cd wat

Rusztowanie Aplikacja internetowa

wat> yo webapp

Oto opcje, których użyłem:

Out of the box I include HTML5 Boilerplate and jQuery.
[?] What more would you like?
[ ] Bootstrap for Sass
>[X] RequireJS
[ ] Modernizr

Teraz przyniosło to wiele nieszczęśliwych wiadomości:

- npm WARN package.json wat@0.0.0 No description
npm WARN package.json wat@0.0.0 No repository field.
npm WARN package.json wat@0.0.0 No README data
...
npm http GET https://registry.npmjs.org/grunt-svgmin
npm http GET https://registry.npmjs.org/grunt-concurrent
npmbower ENOGIT         git is not installed or not in the PATH
http 304 https://registry.npmjs.org/grunt-contrib-requirejs
npm http 304 https://registry.npmjs.org/grunt
npm http 408 https://registry.npmjs.org/grunt-contrib-imagemin
npm ERR! registry error parsing json
npm http 408 https://registry.npmjs.org/grunt-contrib-watch
npm ERR! registry error parsing json
npm http 304 https://registry.npmjs.org/grunt-bower-requirejs
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint
...
npm http 408 https://registry.npmjs.org/grunt-usemin
npm ERR! registry error parsing json
npm http 408 https://registry.npmjs.org/grunt-contrib-connect
npm ERR! registry error parsing json
...
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
...
npm WARN prefer global bower@1.2.7 should be installed with -g

Uruchomiony serwer:

> grunt server

Running "copy:styles" (copy) task
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue. Use --force to continue.

> grunt server --force

Warning:
N:watnode_modulesgrunt-contrib-compassnode_modulestmplibtmp.js:261
throw err;
^
TypeError: Cannot read property "stdout" of undefined
at compile (N:watnode_modulesgrunt-contrib-compasstaskscompass.js:39:10)
at N:watnode_modulesgrunt-contrib-compasstaskscompass.js:70:7
at N:watnode_modulesgrunt-contrib-compasstaskslibcompass.js:121:11

at _fileCreated (N:watnode_modulesgrunt-contrib-compassnode_modules
tmplibtmp.js:172:7)
at OpenReq.Req.done (N:watnode_modulesgrunt-contrib-imageminnode_mod
ulesgifsiclenode_modulesbin-wrappernode_modulesdownloadnode_modulesdecomp
ressnode_modulestarnode_modulesfstreamnode_modulesgraceful-fsgraceful-fs.
js:142:5)
at OpenReq.done (N:watnode_modulesgrunt-contrib-imageminnode_modules
gifsiclenode_modulesbin-wrappernode_modulesdownloadnode_modulesdecompress
node_modulestarnode_modulesfstreamnode_modulesgraceful-fsgraceful-fs.js:6
4:22)
at OpenReq.Req.done (N:watnode_modulesgrunt-contrib-imageminnode_mod
ulesgifsiclenode_modulesbin-wrappernode_modulesdownloadnode_modulesdecomp
ressnode_modulesrimrafnode_modulesgraceful-fsgraceful-fs.js:142:5)
at OpenReq.done (N:watnode_modulesgrunt-contrib-imageminnode_modules
gifsiclenode_modulesbin-wrappernode_modulesdownloadnode_modulesdecompress
node_modulesrimrafnode_modulesgraceful-fsgraceful-fs.js:64:22)
at OpenReq.Req.done (N:watnode_modulesgrunt-contrib-imageminnode_mod
ulespngquant-binnode_modulesbin-wrappernode_modulesdownloadnode_modulesde
compressnode_modulestarnode_modulesfstreamnode_modulesgraceful-fsgraceful
-fs.js:142:5)
at OpenReq.done (N:watnode_modulesgrunt-contrib-imageminnode_modules
pngquant-binnode_modulesbin-wrappernode_modulesdownloadnode_modulesdecomp
ressnode_modulestarnode_modulesfstreamnode_modulesgraceful-fsgraceful-fs.
js:64:22) Used --force, continuing.

Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for
this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass
Used --force, continuing.

Running "copy:styles" (copy) task

Running "autoprefixer:dist" (autoprefixer) task
File ".tmp/styles/main.css" created.

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

Running "watch" task
Waiting...

Teraz problem:

Kiedy przeglądarka otwiera się, mam te dwa 404 ...

Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:9000/bower_components/jquery/jquery.js
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:9000/bower_components/requirejs/require.js

Mogłem ręcznie utworzyć folder i umieścić pliki, ale jaki byłby sens używania tego narzędzia do tworzenia rusztowań.

czego mi brakuje? Jestem nowy w Yeoman, ale w strona początkowa dla yomana jest krystalicznie czysty.

Odpowiedzi:

4 dla odpowiedzi № 1

Musisz zainstalować ruby ​​i kompas. Mówi to właśnie tam.

  1. https://www.ruby-lang.org/en/downloads/

  2. http://compass-style.org/install/


1 dla odpowiedzi nr 2

Wykonałem kroki z węzłem 0.10.20 i npm 1.3.6 bez problemu.

Zaskoczyło mnie to, co masz wanted: {"node":"0.8.x"} dla silnika. Większość pakietów wymaga tylko ">=0.8.0". Chyba, że ​​masz gdzieś spersonalizowany plik package.json lub plik został uszkodzony.

Możesz obejrzeć plik konfiguracyjny npm i dodać zawartość package.json w pytaniu (moje są w / usr / lib / node_modules / npm na linuxie)