angularjs ani-theme build not working - javascript

Based on the instructions given here
Downloaded zip file of ani-theme project from here and extracted zip file contents to C:\dev\angular\ani-theme-master
Installed npm, gulp and bower, here are version info for each tool.
C:\dev\angular\ani-theme-master>gulp -v
[12:49:20] CLI version 3.9.1
[12:49:20] Local version 3.9.1
C:\dev\angular\ani-theme-master>bower -v
1.8.0
C:\dev\angular\ani-theme-master>npm -v
3.10.10
From command prompt change directory to C:\dev\angular\ani-theme-master
bower install
C:\dev\angular\ani-theme-master>bower install
bower ui-router#~0.2.13 cached github.com/angular-ui/ui-router.git#0.2.18
bower ui-router#~0.2.13 validate 0.2.18 against github.com/angular-ui/ui-router.git#~0.2.13
bower json3#^3.3.0 cached github.com/bestiejs/json3.git#3.3.2
bower json3#^3.3.0 validate 3.3.2 against github.com/bestiejs/json3.git#^3.3.0
bower angular#^1.3.0 cached github.com/angular/bower-angular.git#1.6.4
bower angular#^1.3.0 validate 1.6.4 against github.com/angular/bower-angular.git#^1.3.0
bower es5-shim#^4.0.0 cached github.com/es-shims/es5-shim.git#4.5.9
bower es5-shim#^4.0.0 validate 4.5.9 against github.com/es-shims/es5-shim.git#^4.0.0
bower angular-mocks#~1.3.0 cached github.com/angular/bower-angular-mocks.git#1.3.20
bower angular-mocks#~1.3.0 validate 1.3.20 against github.com/angular/bower-angular-mocks.git#~1.3.0
bower bootstrap#^3.2.0 cached github.com/twbs/bootstrap.git#3.3.7
bower bootstrap#^3.2.0 validate 3.3.7 against github.com/twbs/bootstrap.git#^3.2.0
bower angular-animate#~1.3.15 cached github.com/angular/bower-angular-animate.git#1.3.20
bower angular-animate#~1.3.15 validate 1.3.20 against github.com/angular/bower-angular-animate.git#~1.3.15
bower bootstrap-btn-outline-rounded#~0.0.3 cached github.com/sahusoftcom/bootstrap-btn-outline-rounded.git#0.0.4
bower bootstrap-btn-outline-rounded#~0.0.3 validate 0.0.4 against github.com/sahusoftcom/bootstrap-btn-outline-rounded.git#~0.0.3
bower jquery#1.9.1 - 3 cached github.com/jquery/jquery-dist.git#3.2.1
bower jquery#1.9.1 - 3 validate 3.2.1 against github.com/jquery/jquery-dist.git#1.9.1 - 3
bower angular#1.3.20 cached github.com/angular/bower-angular.git#1.3.20
bower angular#1.3.20 validate 1.3.20 against github.com/angular/bower-angular.git#1.3.20
bower angular extra-resolution Unnecessary resolution: angular#1.3.14
bower es5-shim#^4.0.0 install es5-shim#4.5.9
bower json3#^3.3.0 install json3#3.3.2
bower ui-router#~0.2.13 install ui-router#0.2.18
bower angular#1.3.20 install angular#1.3.20
bower bootstrap#^3.2.0 install bootstrap#3.3.7
bower bootstrap-btn-outline-rounded#~0.0.3 install bootstrap-btn-outline-rounded#0.0.4
bower angular-mocks#~1.3.0 install angular-mocks#1.3.20
bower angular-animate#~1.3.15 install angular-animate#1.3.20
bower jquery#1.9.1 - 3 install jquery#3.2.1
es5-shim#4.5.9 bower_components\es5-shim
json3#3.3.2 bower_components\json3
ui-router#0.2.18 bower_components\ui-router
└── angular#1.3.20
angular#1.3.20 bower_components\angular
bootstrap#3.3.7 bower_components\bootstrap
└── jquery#3.2.1
bootstrap-btn-outline-rounded#0.0.4 bower_components\bootstrap-btn-outline-rounded
angular-mocks#1.3.20 bower_components\angular-mocks
└── angular#1.3.20
angular-animate#1.3.20 bower_components\angular-animate
└── angular#1.3.20
jquery#3.2.1 bower_components\jquery
npm install
C:\dev\angular\ani-theme-master>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
gulp build
C:\dev\angular\ani-theme-master>gulp build
[23:42:56] Using gulpfile ~\ani-theme-master\gulpfile.js
(node:9516) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
[23:42:56] Starting 'clean'...
[23:42:56] Finished 'clean' after 99 ms
[23:42:56] Starting 'build'...
[23:42:56] Starting 'jshint'...
[23:43:01] Starting 'jscs'...
[23:43:10] Starting 'styles'...
[23:43:26] Starting 'images'...
[23:43:26] Starting 'fonts'...
[23:43:28] Starting 'extras'...
[23:43:28] Finished 'build' after 32 s
[23:43:29] Finished 'jshint' after 33 s
[23:43:29] Finished 'jscs' after 28 s
[23:43:30] Finished 'images' after 3.1 s
[23:43:37] Finished 'styles' after 27 s
[23:43:37] Starting 'html'...
[23:43:53] Finished 'extras' after 25 s
events.js:160
throw er; // Unhandled 'error' event
^
Error: styles\main.css: error: couldn't process source due to parse error
Unexpected character '#' (1:0)
at transform (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\index.js:20:11)
at Transform._transform (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\index.js:68:25)
at Transform._read (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at Transform._write (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at doWrite (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:237:10)
at writeOrBuffer (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:227:5)
at Transform.Writable.write (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:194:11)
at Readable.ondata (_stream_readable.js:555:20)
at emitOne (events.js:96:13)
at Readable.emit (events.js:188:7)
Anyone know why this error happens, i see npm install shows an error that Unsupported platform for fsevents 32-bit vs 64-bit. May i know which tool is looking for 64-bit?

hope I'm not too late for an answer:
Try changing the the if condition in the html task inside the gulpfile like this:
.pipe($.if('**/*.js', $.ngAnnotate()))
.pipe($.if('**/*.js', $.uglify()))
.pipe($.if('**/*.css', cssChannel()))
.pipe(assets.restore())
.pipe($.useref())
.pipe($.if('**/*.html', $.minifyHtml({conditionals: true, loose: true})))
.pipe(gulp.dest('docs'));

Related

Unable to install jasmine-core in npm Ubuntu

I'm having some problems to install Jasminejs. I'll really appreciate some help please. Thanks!
First I run this:
npm install karma-cli -g
I don't get any errors with this command.
After running this command:
npm install jasmine-core --save-dev
I'm getting this messages:
jasmine-core#2.4.1
UNMET PEER DEPENDENCY karma#
npm warn optional skipping failed optional dependency /chokidar/fsevents
npm warn notsup Not compatible with your operating system or architecture: fsevents#1.0.12
npm warn karma-jasmine#1.0.2 requires a peer of karma#* but none was installed.
npm warn karma phantomjs-launcher#1.0.0 requires a peer of karma#>=0.9 but none was installed
If I try to run this command:
npm install phantomjs-prebuilt --save
I' getting a similar error message. I'm using Ubuntu 14.04.4, Node 5.10.1 and npm 3.10.2 .
You met 'UNMET PEER DEPENDENCY' issue is because NPM3 no longer gets dependencies automatically. You should put missing dependency on the same install command line despite you have already installed the package.
e.g. npm install jasmine-core karma --save-dev

Mupx deployment fails. Why?

I'm trying to deploy Telescope to a simple Ubuntu 16.04 server. So I'm using the suggested deployment with MupX. After setting up the mup.json file, I did a mupx deploy:
$ mupx setup
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Configuration file : mup.json
Settings file : settings.json
Started TaskList: Setup (linux)
[146.185.181.9] - Installing Docker
[146.185.181.9] - Installing Docker: SUCCESS
[146.185.181.9] - Setting up Environment
[146.185.181.9] - Setting up Environment: SUCCESS
[146.185.181.9] - Copying MongoDB configuration
[146.185.181.9] - Copying MongoDB configuration: SUCCESS
[146.185.181.9] - Installing MongoDB
[146.185.181.9] - Installing MongoDB: SUCCESS
No problems there, so after this I tried a mupx deploy, but that ends with an error:
$ mupx deploy
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Configuration file : mup.json
Settings file : settings.json
Meteor app path : /Users/kramer65/dev/repos/Telescope
Using buildOptions : {}
nova:rss: updating npm dependencies -- rss...
Changes to your project's package version selections:
reactrouter:react-router-ssr downgraded from 3.1.4 to 3.1.3
Started TaskList: Deploy app 'telescope' (linux)
[146.185.181.9] - Uploading bundle
[146.185.181.9] - Uploading bundle: SUCCESS
[146.185.181.9] - Sending environment variables
[146.185.181.9] - Sending environment variables: SUCCESS
[146.185.181.9] - Initializing start script
[146.185.181.9] - Initializing start script: SUCCESS
[146.185.181.9] - Invoking deployment process
[146.185.181.9] - Invoking deployment process: SUCCESS
[146.185.181.9] - Verifying deployment
[146.185.181.9] x Verifying deployment: FAILED
-----------------------------------STDERR-----------------------------------
run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm#2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
> fibers#1.0.8 install /bundle/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js
-----------------------------------STDOUT-----------------------------------
To see more logs type 'mup logs --tail=50'
----------------------------------------------------------------------------
So I checked what the logs said:
$ mupx logs --tail=50
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Configuration file : mup.json
Settings file : settings.json
[146.185.181.9] at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
[146.185.181.9] at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
[146.185.181.9] at packages/react-meteor-data/createContainer.jsx:10:16
[146.185.181.9] npm WARN deprecated This version of npm lacks support for important features,
[146.185.181.9] npm WARN deprecated such as scoped packages, offered by the primary npm
[146.185.181.9] npm WARN deprecated registry. Consider upgrading to at least npm#2, if not the
[146.185.181.9] npm WARN deprecated latest stable version. To upgrade to npm#2, run:
[146.185.181.9] npm WARN deprecated
[146.185.181.9] npm WARN deprecated npm -g install npm#latest-2
[146.185.181.9] npm WARN deprecated
[146.185.181.9] npm WARN deprecated To upgrade to the latest stable version, run:
[146.185.181.9] npm WARN deprecated
[146.185.181.9] npm WARN deprecated npm -g install npm#latest
[146.185.181.9] npm WARN deprecated
[146.185.181.9] npm WARN deprecated (Depending on how Node.js was installed on your system, you
[146.185.181.9] npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
[146.185.181.9] npm WARN deprecated on Windows, run them from an Administrator prompt.)
[146.185.181.9] npm WARN deprecated
[146.185.181.9] npm WARN deprecated If you're running the version of npm bundled with
[146.185.181.9] npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
[146.185.181.9] npm WARN deprecated will be bundled with a version of npm#2, which has some small
[146.185.181.9] npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
[146.185.181.9] npm WARN deprecated semver behavior.
[146.185.181.9] npm WARN package.json meteor-dev-bundle#0.0.0 No description
[146.185.181.9] npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
[146.185.181.9] npm WARN package.json meteor-dev-bundle#0.0.0 No README data
[146.185.181.9] npm WARN cannot run in wd meteor-dev-bundle#0.0.0 node npm-rebuild.js (wd=/bundle/bundle/programs/server)
[146.185.181.9] => Starting meteor app on port:80
[146.185.181.9] WARNING: npm peer requirements (for react-meteor-data) not installed:
[146.185.181.9] - react#15.x not installed.
[146.185.181.9] - react-addons-pure-render-mixin#15.x not installed.
[146.185.181.9]
[146.185.181.9] Read more about installing npm peer dependencies:
[146.185.181.9] http://guide.meteor.com/using-packages.html#peer-npm-dependencies
[146.185.181.9]
[146.185.181.9]
[146.185.181.9] /bundle/bundle/programs/server/node_modules/fibers/future.js:267
[146.185.181.9] throw(ex);
[146.185.181.9] ^
[146.185.181.9] Error: Can't find npm module 'react'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?
[146.185.181.9] at Object.Npm.require (/bundle/bundle/programs/server/boot.js:195:17)
[146.185.181.9] at options.fallback (packages/modules-runtime/modules-runtime.js:21:1)
[146.185.181.9] at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:81:1)
[146.185.181.9] at meteorInstall.node_modules.meteor.react-meteor-data.createContainer.jsx (packages/react-meteor-data/createContainer.jsx:5:1)
[146.185.181.9] at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
[146.185.181.9] at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
[146.185.181.9] at meteorInstall.node_modules.meteor.react-meteor-data.react-meteor-data.jsx (packages/react-meteor-data/react-meteor-data.jsx:7:25)
[146.185.181.9] at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
[146.185.181.9] at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
[146.185.181.9] at packages/react-meteor-data/createContainer.jsx:10:16
In these logs I read something about React not being installed. But as far as I can see, it installs Telescope into a Docker container, and I don't really know how I can install react within that container.
Does anybody have any idea what I can do to fix this?

Travis CI Build Keeps Failing

I have a project that I am trying to incorporate Travis CI into for testing.
For the life of me, Travis CI keeps 'failing' when I do a Pull Request and/or push to my repos on GitHub.
Here is my .travis.yml file:
language: node_js
node_js:
- "node"
before_script:
-npm install -g webpack
-npm install -g mocha
-npm install -g chai
-npm start
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
Here is the message from Travis CI about the error:
Using worker: worker-linux-docker-f87d2e7f.prod.travis-ci.org:travis-linux-7
system_info
Build system information
Build language: node_js
Build group: stable
Build dist: precise
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
fix.CVE-2015-7547
$ export DEBIAN_FRONTEND=noninteractive
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 36669 36677
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 36729 36733
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-bin libc-dev-bin libc6-dev
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc-bin libc-dev-bin libc6 libc6-dev
4 upgraded, 0 newly installed, 0 to remove and 221 not upgraded.
Need to get 8,844 kB of archives.
After this operation, 9,216 B disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.13 [2,943 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.13 [84.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.13 [1,179 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.13 [4,637 kB]
Fetched 8,844 kB in 0s (31.7 MB/s)
Preconfiguring packages ...
(Reading database ... 69991 files and directories currently installed.)
Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.13_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.13_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.13_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.13) ...
(Reading database ... 69991 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.13_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.13) ...
Setting up libc-dev-bin (2.15-0ubuntu10.13) ...
Setting up libc6-dev (2.15-0ubuntu10.13) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
git.checkout
0.46s$ git clone --depth=50 --branch=master https://github.com/NAME/mood.ly.git NAME/mood.ly
Cloning into 'NAME/mood.ly'...
remote: Counting objects: 1183, done.
remote: Compressing objects: 100% (507/507), done.
remote: Total 1183 (delta 616), reused 1170 (delta 608), pack-reused 0
Receiving objects: 100% (1183/1183), 665.78 KiB | 0 bytes/s, done.
Resolving deltas: 100% (616/616), done.
Checking connectivity... done.
$ cd NAME/mood.ly
$ git checkout -qf 6bb7813f901f8d3cca359f8a9a1124df4dda86fe
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
Updating nvm to v0.31.0
2.25s$ nvm install node
Downloading https://nodejs.org/dist/v6.1.0/node-v6.1.0-linux-x64.tar.xz...
######################################################################## 100.0%
Now using node v6.1.0 (npm v3.8.6)
$ node --version
v6.1.0
$ npm --version
3.8.6
$ nvm --version
0.31.0
install
47.43s$ npm install
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs#2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN excluding symbolic link index.js -> lib/sass.js
npm WARN excluding symbolic link lib/index.js -> sass.js
mood.ly#1.0.0 /home/travis/build/NAME/mood.ly
├─┬ babel-cli#6.8.0
│ ├─┬ babel-polyfill#6.8.0
│ │ └── babel-regenerator-runtime#6.5.0
│ ├── babel-runtime#6.6.1
│ ├─┬ bin-version-check#2.1.0
│ │ ├─┬ bin-version#1.0.4
***A BUNCH OF OTHER DEPENDENCIES* (it goes over 30K characters so I had to redact it)**
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.12
0.00s$ -npm install -g webpack -npm install -g mocha -npm install -g chai -npm run build-server - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
/home/travis/build.sh: line 45: eval: -n: invalid option
eval: usage: eval [arg ...]
The command "-npm install -g webpack -npm install -g mocha -npm install -g chai -npm run build-server - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start" failed and exited with 2 during .
Your build has been stopped.
Would really appreciate some help/advice with this.
Thanks in advance.
The command "-npm install -g webpack -npm install -g mocha -npm install -g chai -npm run build-server - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start" failed and exited with 2 during .
This line should be the hint. Your npm has a dash before it (i.e: -npm). Add a space between the - and npm in your configuration.
before_script:
- npm install -g webpack
- npm install -g mocha
- npm install -g chai
- npm start
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

Installing NPM packages conflicting with Node.js 5.0.0

I am trying to install npm packages, which i need for my code to work.
However when i try to install any npm package, it gives the same error:
Your environment has been set up for using Node.js 5.0.0 (x64) and npm.
C:\Windows\System32>npm install mime
C:\Windows\System32
└── mime#1.3.4
npm WARN ENOENT ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN EPACKAGEJSON C:\Windows\System32 No description
npm WARN EPACKAGEJSON C:\Windows\System32 No repository field.
npm WARN EPACKAGEJSON C:\Windows\System32 No README data
npm WARN EPACKAGEJSON C:\Windows\System32 No license field.
C:\Windows\System32>
I have tried re-installing node.js twice, but this didn't work. I've also tried to run it as administrator and install it again, which didn't work.
My classmate also works with node.js, but whenever he isntalled node.js everything worked fine from begin, also installing npm packages.
I'd really appreciate your guys help!
Sincerely,
Ivar
The error messages you're receiving aren't telling you the installation failed, just that you don't have a package.json in the system32 folder. For global install add -g to the installation:
npm install -g mime --save
--save just means you save it to your package.json if you're in a root project that has a package.json.
There should be a node_modules in system32 provided you have writing access to it. (sometimes you need to enable that even for admins).
Well, actually it installed package. Check node_modules folder.
It complains that you don't have package.json file and README, etc.

Bower - EPERM, unlink error

I'm encountering the below error stack trace, while I try to install "jQuery" using Bower. Can someone offer some help?
C:\study\meanApp>bower install jquery --save
bower not-cached git://github.com/jquery/jquery.git#*
bower resolve git://github.com/jquery/jquery.git#*
bower download https://github.com/jquery/jquery/archive/2.1.1.tar.gz
bower retry Download of https://github.com/jquery/jquery/archive/2.1.1.t
ar.gz failed, trying with git..
bower EPERM EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\AUserZ\bower\jquery-8680-AaJIqU\archive.tar.gz'
Stack trace:
Error: EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\A-UserZ\bower\jqu
ery-8680-AaJIqU\archive.tar.gz'
Console trace:
Trace
at StandardRenderer.error (C:\Users\UserZ\AppData\Roaming\npm\node_module
s\bower\lib\renderers\StandardRenderer.js:72:17)
at Logger.<anonymous> (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bo
wer\bin\bower:110:22)
at Logger.EventEmitter.emit (events.js:95:17)
at Logger.emit (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\nod
e_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\lib\commands\ind
ex.js:40:20
at _rejected (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_
modules\q\q.js:797:24)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:823:30
at Promise.when (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\no
de_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\UserZ\AppData\Roaming\npm\no
de_modules\bower\node_modules\q\q.js:741:41)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:557:44
System info:
Bower version: 1.3.9
Node version: 0.10.18
OS: Windows_NT 6.1.7601 ia32
P.S: I've gone through the StackOverflow could find nothing related to my error, hence posting this question.
Thanks in advance,
Dave
Cleaning the cache resolved the error for me: npm cache clean
I got the same error "EPERM, unlink" but with a different archive.
Running these commands resolved the issue for me:
npm uninstall -g bower
npm update decompress-zip
npm install -g bower
This link is where I saw to use those commands: https://github.com/bower/bower/issues/798
It is the updating of the decompress-zip that has resolved the issue for others as well.
I got this error and ran the bower in verbose mode. And found the error as below:
bower error SELF_SIGNED_CERT_IN_CHAIN
To resolve this, add below line into .bowerrc created in your default home directory.
"strict-ssl": false
Try bower install again, it should work.
You could try the following sequence. It worked for me.
bower cache clean
npm uninstall -g bower
npm install -g bower
bower install jQuery#2.1.1
I had a similar problem and i resolved it pretty easily; I was trying to bower install while running a server from my machine. I disconnected the server and IDE (webstorm) and it worked.
i also got the same problem and i tried again all uninstalled everything then after i install again gitbash
command in gitbash
$ npm install -g bower // let it execute
once executed
again command
$ bower install bootstrap // let it execute
when executed you got
if want more then run more commands :)
e.g.
$ bower install script.js
Whenever I encounter this error, what I do is to clean the npm's cache,
npm cache clean
and if it doesn't work, I uninstall the concerned bower component, and install it again.
Uninstall your old node (it may be < 0.12.0)
And Install node version > v0.12.0 (In my case v0.12.7)
Then
npm update npm -g
And
bower install
I resolved it by running
bower cache clean

Categories