When writing question used the Google translator.
On a freshly installed ubuntu 14.04 set nodejs -
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs
Then install yo -
sudo npm i -g yo
I then install generator-angular -
sudo npm i -g generator-angular
From the directory you open a terminal and install generator-angular -
yo angular
And get a lot of errors. Why? How to fix it?
Sergio Lopez Mendez - Thank You for your help!
Я изменил прова на директорию node_modules
sudo chown -R user:group /usr/lib/node_modules/
sudo chown -R `whoami` ~/.npm
And mistakes are almost gone, but still, almost..
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
deprecated [email protected]: use grunt-ng-annotate instead
...
npm WARN deprecated [email protected]: use ng-annotate instead
npm WARN optional dep failed, continuing [email protected]
...
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/findup-sync requires lodash@'~2.4.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/lodash,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/grunt-legacy-log requires lodash@'~2.4.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/lodash,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/findup-sync/node_modules/glob requires minimatch@'0.3' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/minimatch,
npm WARN unmet dependency which is version 0.2.14
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/js-yaml/node_modules/argparse requires underscore.string@'~2.3.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/underscore.string,
npm WARN unmet dependency which is version 2.2.1
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-google-cdn/node_modules/google-cdn/node_modules/bower requires semver@'~2.1.0' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-google-cdn/node_modules/google-cdn/node_modules/semver,
npm WARN unmet dependency which is version 2.2.1
WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-build/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/node_modules/bin-build/node_modules/download/node_modules/request/node_modules/form-data requires async@'~0.9.0' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/async,
npm WARN unmet dependency which is version 0.7.0
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
And just in case all of the text
acopalipsis@acopalipsis-pc:~$ cd /home/acopalipsis/my-test-two/
acopalipsis@acopalipsis-pc:~/my-test-two$ yo angular
_-----_
| | .--------------------------.
|--(o)--| | Welcome to Yeoman, |
`---------´ | ladies and gentlemen! |
( _´U`_ ) '--------------------------'
/___A___\
| ~ |
__'.___.'__
´ ` |° ´ Y `
Out of the box I include Bootstrap and some AngularJS recommended modules.
[?] Would you like to use Sass (with Compass)? No
[?] Would you like to include Bootstrap? Yes
[?] Which modules would you like to include? angular-animate.js, angular-cookies.js, angular-resource.js, angular-route.js, angular-sanitize.js, angular-touch.js
create app/styles/main.css
create app/index.html
create bower.json
identical .bowerrc
create package.json
create Gruntfile.js
invoke angular:common:/usr/lib/node_modules/generator-angular/app/index.js
identical .editorconfig
identical .gitattributes
identical .jshintrc
identical .gitignore
create test/.jshintrc
create app/.buildignore
create app/.htaccess
create app/404.html
create app/favicon.ico
create app/robots.txt
create app/views/main.html
create app/images/yeoman.png
invoke angular:main:/usr/lib/node_modules/generator-angular/app/index.js
create app/scripts/app.js
invoke angular:controller:/usr/lib/node_modules/generator-angular/app/index.js
create app/scripts/controllers/main.js
create test/spec/controllers/main.js
invoke karma:app
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.
invoke angular:route
invoke angular:controller:/usr/lib/node_modules/generator-angular/route/index.js
create app/scripts/controllers/about.js
create test/spec/controllers/about.js
invoke angular:view:/usr/lib/node_modules/generator-angular/route/index.js
create app/views/about.html
create test/karma.conf.js
identical .travis.yml
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
deprecated [email protected]: use grunt-ng-annotate instead
bower cached git://github.com/angular/bower-angular.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular.git#1.2.16
bower cached git://github.com/bestiejs/json3.git#3.3.2
bower validate 3.3.2 against git://github.com/bestiejs/json3.git#~3.3.1
bower cached git://github.com/es-shims/es5-shim.git#3.1.1
bower validate 3.1.1 against git://github.com/es-shims/es5-shim.git#~3.1.0
bower cached git://github.com/twbs/bootstrap.git#3.2.0
bower validate 3.2.0 against git://github.com/twbs/bootstrap.git#~3.2.0
bower cached git://github.com/angular/bower-angular-resource.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-resource.git#1.2.16
bower cached git://github.com/angular/bower-angular-cookies.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-cookies.git#1.2.16
bower cached git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower cached git://github.com/angular/bower-angular-touch.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-touch.git#1.2.16
bower cached git://github.com/angular/bower-angular-animate.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-animate.git#1.2.16
bower cached git://github.com/angular/bower-angular-route.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-route.git#1.2.16
bower cached git://github.com/angular/bower-angular-mocks.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-mocks.git#1.2.16
bower cached git://github.com/angular/bower-angular-scenario.git#1.2.16
bower validate 1.2.16 against git://github.com/angular/bower-angular-scenario.git#1.2.16
npm WARN deprecated [email protected]: use ng-annotate instead
npm WARN optional dep failed, continuing [email protected]
bower cached git://github.com/jquery/jquery.git#2.1.1
bower validate 2.1.1 against git://github.com/jquery/jquery.git#>= 1.9.0
bower install json3#3.3.2
bower install es5-shim#3.1.1
bower install angular-resource#1.2.16
bower install bootstrap#3.2.0
bower install angular-mocks#1.2.16
bower install angular-scenario#1.2.16
bower install angular-sanitize#1.2.16
bower install angular#1.2.16
bower install angular-route#1.2.16
bower install angular-animate#1.2.16
bower install angular-touch#1.2.16
bower install angular-cookies#1.2.16
bower install jquery#2.1.1
> [email protected] install /home/acopalipsis/my-test-two/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Download already available at /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
Extracting tar contents (via spawned process)
-
json3#3.3.2 bower_components/json3
es5-shim#3.1.1 bower_components/es5-shim
angular-resource#1.2.16 bower_components/angular-resource
└── angular#1.2.16
bootstrap#3.2.0 bower_components/bootstrap
└── jquery#2.1.1
angular-mocks#1.2.16 bower_components/angular-mocks
└── angular#1.2.16
angular-scenario#1.2.16 bower_components/angular-scenario
└── angular#1.2.16
angular-sanitize#1.2.16 bower_components/angular-sanitize
└── angular#1.2.16
angular#1.2.16 bower_components/angular
angular-route#1.2.16 bower_components/angular-route
└── angular#1.2.16
angular-animate#1.2.16 bower_components/angular-animate
└── angular#1.2.16
angular-touch#1.2.16 bower_components/angular-touch
└── angular#1.2.16
angular-cookies#1.2.16 bower_components/angular-cookies
└── angular#1.2.16
jquery#2.1.1 bower_components/jquery
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2-extract-1405706835721/phantomjs-1.9.7-linux-x86_64 -> /home/acopalipsis/my-test-two/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /home/acopalipsis/my-test-two/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs
> [email protected] install /home/acopalipsis/my-test-two/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Вход в каталог `/home/acopalipsis/my-test-two/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Выход из каталога `/home/acopalipsis/my-test-two/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/findup-sync requires lodash@'~2.4.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/lodash,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/grunt-legacy-log requires lodash@'~2.4.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/lodash,
npm WARN unmet dependency which is version 0.9.2
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/findup-sync/node_modules/glob requires minimatch@'0.3' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/minimatch,
npm WARN unmet dependency which is version 0.2.14
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/js-yaml/node_modules/argparse requires underscore.string@'~2.3.1' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt/node_modules/underscore.string,
npm WARN unmet dependency which is version 2.2.1
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-google-cdn/node_modules/google-cdn/node_modules/bower requires semver@'~2.1.0' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-google-cdn/node_modules/google-cdn/node_modules/semver,
npm WARN unmet dependency which is version 2.2.1
WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-build/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
which is version undefined
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/node_modules/bin-build/node_modules/download/node_modules/request/node_modules/form-data requires async@'~0.9.0' but will load
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/async,
npm WARN unmet dependency which is version 0.7.0
npm WARN unmet dependency /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
[email protected] node_modules/grunt-karma
└── [email protected]
[email protected] node_modules/karma-phantomjs-launcher
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/karma
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])
[email protected] node_modules/karma-jasmine
> [email protected] postinstall /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node index.js
✓ pre-build test passed successfully
> [email protected] postinstall /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin
> node index.js
✓ pre-build test passed successfully
> [email protected] postinstall /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle
> node index.js
✓ pre-build test passed successfully
> [email protected] postinstall /home/acopalipsis/my-test-two/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin
> node index.js
✓ pre-build test passed successfully
[email protected] node_modules/grunt-contrib-copy
[email protected] node_modules/jshint-stylish
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])
[email protected] node_modules/grunt-concurrent
├── [email protected] ([email protected])
└── [email protected]
[email protected] node_modules/grunt-contrib-clean
└── [email protected]
[email protected] node_modules/grunt-contrib-concat
└── [email protected] ([email protected], [email protected], [email protected])
[email protected] node_modules/time-grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])
[email protected] node_modules/grunt-filerev
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])
[email protected] node_modules/grunt-contrib-cssmin
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
[email protected] node_modules/grunt-newer
├── [email protected]
└── [email protected]
[email protected] node_modules/grunt-contrib-uglify
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-ngmin
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-contrib-htmlmin
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-contrib-jshint
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-wiredep
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-autoprefixer
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])
[email protected] node_modules/grunt-contrib-watch
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected]
[email protected] node_modules/grunt-usemin
├── [email protected] ([email protected])
└── [email protected]
[email protected] node_modules/grunt-contrib-connect
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/load-grunt-tasks
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
[email protected] node_modules/grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
[email protected] node_modules/grunt-svgmin
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-google-cdn
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] node_modules/grunt-contrib-imagemin
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
app/index.html modified.
Yeoman is a generic scaffolding system allowing the creation of any kind of app. It allows for rapidly getting started on new projects and streamlines the maintenance of existing projects.
It seems to be a problem with permissions. Either run
sudo chown -R `whoami` ~/.npm
(from npm throws error without sudo)
or install node the right way as described here https://stackoverflow.com/a/24404451/2079602
As for the second question, you can safely ignore any lines with:
npm WARN unmet dependency
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With