karma test pass but npm test give error - node.js

i use https://github.com/AngularClass/angular2-webpack-starter and have foloowing problem: when I'm in project directory and run
karma start
Then i get:
SUMMARY:
✔ 0 tests completed
But when i run:
npm test
I get:
SUMMARY:
✔ 0 tests completed
npm ERR! Test failed. See above for more details.
If I run:
npm run test
I get:
SUMMARY:
✔ 0 tests completed
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.1.0/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! node v7.1.0
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter#5.0.5 test: `karma start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter#5.0.5 test script 'karma start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! karma start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Kamil/Desktop/Code/officewise/officewise_frontend/npm-debug.log
Any idea what to do to remove this npm ERR? This is important for me because I use some external system to run tests and report errors of new commits in repository (my node version v7.1.0 (lastest), npm version 4.0.2 (lastest), Mac OS Sierra).

By default, Karma exits with an error if there are no tests to run.
To disable this behaviour, you need to add this line to your Karma configuration:
failOnEmptyTestSuite: false

Related

npm install error after uninstalling Hyperledger-composer - Blockchain

Hello I'm currently learning hyperledger composer but I reinstalled it and i'm installing it again. Now when I npm install, I get the error below. If anyone can help me out that would be great.
➜ Dabbous-Innopay npm install
> fabric-dev-servers#0.0.14 prepare /Users/alydabbous/code/Dabbous-Innopay
> npm run build-archives
> fabric-dev-servers#0.0.14 build-archives /Users/alydabbous/code/Dabbous-Innopay
> gulp --gulpfile .travis/gulp.js
[16:45:08] No gulpfile found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fabric-dev-servers#0.0.14 build-archives: `gulp --gulpfile .travis/gulp.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fabric-dev-servers#0.0.14 build-archives script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alydabbous/.npm/_logs/2018-11-05T15_45_08_550Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fabric-dev-servers#0.0.14 prepare: `npm run build-archives`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fabric-dev-servers#0.0.14 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alydabbous/.npm/_logs/2018-11-05T15_45_08_587Z-debug.log
Make sure You are Using Node 8.9 or bellow:
node -v
if output is more than 8.9 then uninstall node and re-install it with 8.9 version or use nvm(Node Version Manager). Google it you can find above process easily.

ERR! while running node.js app

Whenever I try to run node.js application, I get error messages though application runs successfully. Just curious what does these errors really mean.
Here is the output from the console while running a simple node.js application:
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! app-service-hello-world#0.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-service-hello-world#0.0.1 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app-service-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app-service-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app-service-hello-world
npm ERR! There is likely additional logging output above.

Trying to install npm on Raspberry Pi Error

I am working on a simple smart mirror project with javascript and electron. I was able to get the software working on my laptop but when I moved it to the raspberry pi I am having issues installing npm. After entering "npm install" I get this:
npm WARN package.json bcrypt-pbkdf#1.0.1 No repository field.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'types/jquery' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'smart-mirror-server'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 4.9.24-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/Desktop/smart-connected-mirror-master
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Desktop/smart-connected-mirror-master/npm-debug.log
npm ERR! not ok code 0
I have tried
sudo apt-get update
as well as
sudo apt-get upgrade
Any ideas what to do? Thanks!
EDIT:
I updated the node.js to a more current version and now it installed without error. However, when I typed in the command
npm start
I get this:
sh: 1: electron: Permission denied
npm ERR! Linux 4.9.24-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! smart-mirror-server#1.0.0 start: `electron .`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the smart-mirror-server#1.0.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the smart-mirror- server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs smart-mirror-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls smart-mirror-server
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.npm/_logs/2017-05-29T03_33_22_466Z-debug.log
Have you seen this issue? Electron works only on RaspberryPi 2/3 what version are you using?
Also have you run npm install before actually run the app? Sometimes when copying node_modules from OS to OS the executable permissions get very confused.
You can try a fresh install with: rm -rf node_modules && npm install

Jipster Client Only App Error Non-abstract class 'AuthExpiredInterceptor'

Hi I'm trying to install a client only version of jhipster.
I have used the following commands:
yo jhipster:client through yarn
but no luck, same with:
yo jhipster:client --npm --auth
and I still get the same error.
The server side generates fine but the client side is causing problems.
I'm on node: v7.7.1
ERROR in [at-loader] src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts:6:14
TS2515: Non-abstract class 'AuthExpiredInterceptor' does not implement inherited abstract member 'responseIntercept' from class 'HttpInterceptor'.
ERROR in [at-loader] src/main/webapp/app/shared/login/login.service.ts:12:37
TS2304: Cannot find name 'AuthServerProvider'.
ERROR in [at-loader] src/main/webapp/app/shared/shared.module.ts:10:5
TS2305: Module '"/Volumes/Flux/jhipster/src/main/webapp/app/shared/index"' has no exported member 'AuthServerProvider'.
Child html-webpack-plugin for "index.html":
[./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] ./~/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html 1.21 kB {0} [built]
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/Charlie/.nvm/versions/node/v7.7.1/bin/node" "/Users/Charlie/.nvm/versions/node/v7.7.1/bin/npm" "run" "webpack:build"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! jhipster#0.0.0 webpack:build: `webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the jhipster#0.0.0 webpack:build script 'webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jhipster package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs jhipster
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls jhipster
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Volumes/Flux/jhipster/npm-debug.log
npm WARN #angular/compiler-cli#2.4.9 requires a peer of #angular/compiler#2.4.9 but none was installed.
npm WARN #angular/compiler-cli#2.4.9 requires a peer of #angular/core#2.4.9 but none was installed.
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/Charlie/.nvm/versions/node/v7.7.1/bin/node" "/Users/Charlie/.nvm/versions/node/v7.7.1/bin/npm" "install"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! jhipster#0.0.0 postinstall: `node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jhipster#0.0.0 postinstall script 'node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jhipster package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs jhipster
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls jhipster
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Volumes/Flux/jhipster/npm-debug.log
Client application generated successfully.
Start your Webpack development server with:
found it:
yo jhipster:client --auth jwt
the --help flags are not well documented for auth types but works though

Error in deploying locally-blockchain technology

when i tried to deploy my nodejs app (blockchain) locally, i encountered the below error.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--quiet"
npm ERR! node v4.7.2
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 install script 'node-gyp configure build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hashtable package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hashtable
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hashtable
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
ERROR: Service 'asset-diamond-demo' failed to build: The command '/bin/sh -c npm install --quiet' returned a non-zero code: 1
But when i deployed it from my personal laptop at home, it got deployed.
seems to be not building at office.
can anyone suggest any solutions?
Install nvm and use it to ensure you have a clean, up to date working Node setup. Try installing Node 7.something with nvm instead of 4.

Resources