Node.js Application in container starts and crashes - node.js

I have a node.js application talking to mongo database working fine locally. Mongodb is running on my lap top locally and the application is started in vscode with npm run dem. This all works fine.
The application is containerized and starts normally with same commands. However after a few seconds it crashes.
I have tried different format of docker files, docker compose, I have searched google and could not find any solution
Any help would be appreciated.
Here is my docker file
FROM node:14.15.3
ENV APP_HOME=/home/node/app
ENV NODE_ENV=production
ENV NODE_PORT=3002
RUN mkdir -pv $APP_HOME && chown -R node:node $APP_HOME
WORKDIR $APP_HOME
USER node
COPY --chown=node:node package.json $APP_HOME/
RUN npm install && npm cache clean --force
COPY --chown=node:node . .
RUN npm run build
EXPOSE $NODE_PORT
CMD ["node","./dist/server.generated.js"]
Here are the logs
docker run --name test --net app-net -p 3002:3002 test
Server started on port 3002.
Material-UI: theme.mixins.gutters() is deprecated.
/home/node/app/dist/server.generated.js:1
module.exports=function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b69c46eb2e3b test "docker-entrypoint.s…" 16 minutes ago Exited (1) 15 minutes ago test
179c0ac2162b mongo "docker-entrypoint.s…" 10 days ago Up 10 days 0.0.0.0:27017->27017/tcp app-db
Here is the package.json
{
"name": "ecommerce",
"version": "2.0.0",
"license": "MIT",
"keywords": [
"react",
"express",
"mongodb",
"node"
],
"main": "./dist/server.generated.js",
"scripts": {
"development": "nodemon",
"build": "webpack --config webpack.config.client.production.js && webpack --mode=production --config webpack.config.server.js",
"start": "node ./node_modules/pm2/bin/pm2 start ./dist/server.generated.js --name ecommerceapp --log ../logs/app.log ",
"stop": "node ./node_modules/pm2/bin/pm2 stop ecommerceapp",
"dem": "node ./dist/server.generated.js"
},
"engines": {
"node": "14.15.3",
"npm": "8.5.5"
},
"devDependencies": {
"#babel/core": "^7.9.0",
"#babel/preset-env": "^7.9.0",
"#babel/preset-react": "^7.9.4",
"babel-loader": "^8.1.0",
"file-loader": "^6.0.0",
"nodemon": "^2.0.2",
"webpack": "^4.42.1",
"webpack-cli": "^4.3.1",
"webpack-dev-middleware": "3.7.2",
"webpack-hot-middleware": "^2.25.0",
"webpack-node-externals": "^1.7.2",
"webpack-dev-server": "^4.7.4"
},
"dependencies": {
"#babel/core": "^7.9.0",
"#babel/preset-env": "^7.9.0",
"#babel/preset-react": "^7.9.4",
"babel-loader": "^8.1.0",
"pm2": "^4.2.0",
"#hot-loader/react-dom": "^16.13.0",
"#material-ui/core": "^4.9.8",
"#material-ui/icons": "^4.9.1",
"#material-ui/styles": "^4.9.6",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-jwt": "^5.3.1",
"formidable": "^1.2.2",
"file-loader": "^6.0.0",
"helmet": "^3.22.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"mongoose": "^5.9.7",
"query-string": "^6.11.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hot-loader": "^4.12.20",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-stripe-elements": "^6.1.1",
"request": "^2.88.2",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0",
"stripe": "^8.38.0",
"webpack": "^4.42.1",
"webpack-cli": "^4.3.1",
"webpack-dev-middleware": "3.7.2",
"webpack-hot-middleware": "^2.25.0",
"webpack-node-externals": "^1.7.2"
},
}
}

Related

Vuejs Module not found: Error: Can't resolve '../dist/helpers.esm' in node_modules/chart.js/helpers

I am trying to run npm run dev on one of my projects and getting **Module not found: Error: Can't resolve '../dist/helpers.esm' in node_modules/chart.js/helpers
You can see here => https://i.stack.imgur.com/wZc3o.png
Package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"serve": "php artisan serve",
"clear-cache": "php artisan optimize:clear && composer dump-autoload && composer cc && npm cache clean --force"
},
"devDependencies": {
"axios": "^0.21.1",
"bootstrap": "^4.0.0",
"cross-env": "^5.2.1",
"jquery": "^3.2",
"laravel-mix": "^6.0.43",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^5.0.0",
"sass-loader": "^12.6.0",
"vue": "^2.5.7",
"vue-loader": "^15.9.8"
},
"dependencies": {
"chart.js": "^3.8.0",
"chartjs-plugin-datalabels": "^2.0.0",
"css-percentage-circle": "^2.0.1",
"echarts": "^5.3.2",
"jspdf": "^2.3.1",
"jspdf-autotable": "^3.5.15",
"laravel-echo": "^1.11.7",
"moment": "^2.29.1",
"moment-timezone": "^0.5.32",
"node-sass": "^7.0.1",
"npm": "^8.6.0",
"pdf-lib": "^1.17.1",
"percircle": "^1.0.28",
"percircle-vue": "^0.1.2",
"pusher-js": "^7.1.0-beta",
"tinymce": "^5.7.1",
"v-charts": "^1.17.10",
"v-skeletor": "^0.0.4",
"v-slim-dialog": "0.0.10",
"vue-axios": "^2.1.4",
"vue-chartjs": "^4.0.0",
"vue-codemirror": "^4.0.6",
"vue-confirm-dialog": "^1.0.2",
"vue-css-percentage-circle": "^2.0.0",
"vue-js-modal": "^2.0.1",
"vue-month-picker": "^1.5.0",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.4.9",
"vue-step-progress": "^0.3.7",
"vue-tinymce-editor": "^1.6.2",
"vue-toast-notification": "^0.6.2",
"vue2-daterange-picker": "^0.6.8",
"vuedraggable": "^2.24.3",
"vuejs-datepicker": "^1.6.2",
"vuejs-dialog": "^1.4.2",
"vuex-persistedstate": "^3.0.0",
"yan-progress": "^1.0.3"
}
}
Node version install on my system is 18.0.0 and npm is 8.6.0
It was working just fine but now its not

how to run multiple watch script in docker

I'am moving my react apps into docker, I am working in legacy project and we have multiple react apps. We are attaching script with react apps in script tags on every page whose need to use this files. For docker we want to use Express to serve our files.
Is there any way to run multiple watch commands ?
here is my package.json file:
{
"name": "docker apps",
"version": "3.0.0",
"description": "apps",
"license": "ISC",
"author": "devs",
"main": "main.js",
"engines": {
"node": ">=14.7.0",
"npm": ">=6.14.13"
},
"scripts": {
"requirements-check": "node checkNodeVersion.js",
"react": "webpack --env.mode production --env.app react",
"react-watch": "webpack --env.mode development --env.app react --watch",
"serve": "nodemon server.js",
"serve:prod": "node server.js --port=80",
"build": "npm run react",
"start": "npm run react-watch",
"test": "jest",
"lint": "eslint .",
"dev-start": "concurrently \"npm run react-watch\" \"npm run serve\"",
"dev-build": "concurrently \"npm run build\" \"npm run serve:prod\"",
"lint-payment": "eslint payment/",
"lint-formLibrary": "eslint formLibrary/",
"lint-fileManager": "eslint fileManager/",
"lint-blockLibrary": "eslint LPBlockLibrary/",
"lint-contracts": "eslint contracts/",
"lint-payment:fix": "eslint --fix payment/",
"lint-formLibrary:fix": "eslint --fix formLibrary/",
"lint-fileManager:fix": "eslint --fix fileManager/",
"lint-blockLibrary:fix": "eslint --fix LPBlockLibrary/",
"lint-contracts:fix": "eslint --fix contracts/",
"lint:fix": "eslint --fix ."
},
"dependencies": {
"#mikecousins/react-pdf": "^5.5.1",
"#tkaramanski/fmcomponents": "^1.6.2",
"#types/testing-library__jest-dom": "^5.9.5",
"axios": "^0.21.1",
"bootstrap": "^4.1.3",
"classnames": "^2.2.6",
"cors": "^2.8.5",
"express": "^4.17.1",
"gulp-cli": "^2.2.0",
"gulp-install": "^1.1.0",
"handlebars-loader": "^1.7.1",
"jsdom": "^16.6.0",
"lodash": "^4.17.11",
"postcss": "^8.1.4",
"postcss-js": "^3.0.1",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-bs-notifier": "^5.0.0",
"react-datepicker": "^4.1.1",
"react-dnd": "^7.3.2",
"react-dnd-html5-backend": "^7.2.0",
"react-dom": "^16.9.0",
"react-dropzone": "^7.0.1",
"react-hook-form": "^4.9.6",
"react-hot-loader": "^4.12.18",
"react-infinite-scroll-component": "^4.2.0",
"react-jss": "^8.6.1",
"react-popper-tooltip": "^4.3.1",
"react-redux": "^7.1.3",
"react-router-dom": "^5.2.0",
"react-scrollbar": "^0.5.4",
"reactstrap": "^6.5.0",
"redux": "^4.0.4",
"redux-devtools-extension": "^2.13.8",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"resolve-url-loader": "^3.1.2",
"semver": "^5.7.1",
"styled-components": "^5.3.0",
"typesafe-actions": "^5.1.0"
},
"devDependencies": {
"#babel/core": "^7.13.14",
"#babel/plugin-proposal-class-properties": "^7.13.0",
"#babel/plugin-proposal-optional-chaining": "^7.13.12",
"#babel/plugin-transform-runtime": "^7.13.10",
"#babel/preset-env": "^7.13.12",
"#babel/preset-react": "^7.13.13",
"#babel/preset-stage-0": "^7.8.3",
"#babel/preset-typescript": "^7.13.0",
"#testing-library/jest-dom": "^5.14.1",
"#testing-library/react": "^11.2.5",
"#tkaramanski/fmcomponents": "^1.5.1",
"#types/jest": "^26.0.22",
"#types/react": "^17.0.3",
"#types/react-datepicker": "^4.1.4",
"#types/react-dom": "^17.0.2",
"#types/react-lazyload": "^3.1.0",
"#types/react-redux": "^7.1.16",
"#types/react-router-dom": "^5.1.8",
"#types/styled-components": "^5.1.7",
"#typescript-eslint/eslint-plugin": "^4.17.0",
"autoprefixer": "^9.8.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-macros": "^3.0.1",
"babel-plugin-styled-components": "^1.12.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"clean-webpack-plugin": "^3.0.0",
"concurrently": "^5.2.0",
"copy-webpack-plugin": "^6.0.1",
"css-loader": "^3.6.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"eslint": "^7.10.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.3",
"eslint-plugin-react-hooks": "^4.2.0",
"extract-loader": "^5.1.0",
"file-loader": "^6.0.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-cli": "^2.2.0",
"gulp-concat": "^2.6.1",
"gulp-sourcemaps": "^2.6.5",
"gulp-uglify": "^3.0.2",
"husky": "^4.3.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"mini-css-extract-plugin": "^0.9.0",
"moment": "^2.26.0",
"postcss-loader": "^3.0.0",
"prettier": "^2.4.1",
"pump": "^3.0.0",
"react-copy-to-clipboard": "^5.0.2",
"react-test-renderer": "^16.13.1",
"react-tippy": "^1.4.0",
"redux-mock-store": "^1.5.4",
"renamer": "^1.1.4",
"sass": "^1.35.1",
"sass-loader": "^8.0.2",
"style-loader": "^1.2.1",
"ts-jest": "^26.5.4",
"ts-loader": "^8.1.0",
"typescript": "4.2.3",
"url-loader": "^4.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-fix-style-only-entries": "^0.5.0",
"webpack-merge": "^4.2.2",
"wildcards-entry-webpack-plugin": "^2.1.0"
},
"husky": {
"hooks": {
"pre-commit": "npm run requirements-check",
"pre-push": "npm run lint"
}
},
"jest": {
"setupTestFrameworkScriptFile": "./setupTests.js",
"setupFiles": [
"./payment/src/__mocks__/data.js"
],
"collectCoverageFrom": [
"payment/src/__tests__/*.{js,jsx}",
"LPBlockLibrary/src/__testes__/*{ts,tsx}"
],
"moduleNameMapper": {
"\\.(png|jpg|gif|ttf|eot|svg)$": "<rootDir>/config/jest/fileMock.js"
},
"transform": {
"\\.tsx?$": "ts-jest",
"\\.jsx?$": "babel-jest"
}
}
}
here is my docker:
FROM node:14.17.0
WORKDIR /frontend-apps
ENV PATH /frontend-apps/node_modules/.bin:$PATH
COPY package.json \
package-lock.json \
.npmrc ./
RUN npm config set strict-ssl false
RUN npm install
RUN npm config set strict-ssl true
COPY . ./
EXPOSE 80
CMD [ "npm", "run", "dev-start"]
here is my docker-compose file.
version: '3.7'
services:
frontend-docker-app:
container_name: docker-front-apps
build:
context: .
dockerfile: Dockerfile.test
volumes:
- '.:/frontendApps'
- '/frontendApps/node_modules'
ports:
- 3000:3000
in docker file I try to run multiple commands with concurrently
"react-watch": "webpack --env.mode development --env.app react --watch",
"serve": "nodemon server.js",
"dev-start": "concurrently \"npm run react-watch\" \"npm run serve\"",
I solved my problem, it turned out that I accidentally remove my nodemon package from package.json, and I had bad docker compose config. I changed it to this version:
version: '3.7'
services:
frontend-docker-app:
container_name: docker-front-apps
working_dir: /var/www/app
build:
context: .
dockerfile: Dockerfile.test
volumes:
- .:/var/www/app
- '/frontendApps/node_modules'
tty: true
ports:
- 3000:3000
environment:
- CHOKIDAR_USEPOLLING=true
and changed cmd command from Docker file to this:
EXPOSE 80
CMD [ "npm", "run", "dev-build"]
and everything works fine.

Nuxt js high CPU usage in dev environment

Since few updates my app front part in docker container doesn't work well
It use above 100% of Docker CPU, 60/70% of my laptop CPU (fans run at 100%)
And the HMR is very slow
This issue doesn't appear on production and on others laptops
I tried many things from different forums similar issues but nothing work
I reseted Docker to factory defaults settings, allowed more memory and CPU
I updated my dependencies
I removed and restored my node modules
I don't know what i should check to fix this issue
MacOS Catalina 10.15.4
Node v13.12.0
My package.json
{
"name": "front",
"version": "1.0.1",
"description": "My first-class Nuxt.js project",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "HOST=0.0.0.0 PORT=8080 nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue .",
"precommit": "npm run lint"
},
"config": {
"nuxt": {
"host": "0.0.0.0",
"port": "8080"
}
},
"dependencies": {
"#fullcalendar/core": "^4.3.1",
"#fullcalendar/daygrid": "^4.3.0",
"#fullcalendar/interaction": "^4.3.0",
"#fullcalendar/timegrid": "^4.3.0",
"#fullcalendar/vue": "^4.3.1",
"#nuxt/webpack": "^2.11.0",
"#nuxtjs/auth": "^4.5.3",
"#nuxtjs/axios": "^5.4.1",
"#nuxtjs/google-analytics": "^2.2.0",
"#nuxtjs/google-tag-manager": "^2.1.4",
"#nuxtjs/gtm": "^2.2.3",
"#nuxtjs/pwa": "^2.6.0",
"#nuxtjs/robots": "^2.0.0",
"#nuxtjs/router": "^1.3.2",
"#nuxtjs/sitemap": "^0.2.2",
"algoliasearch": "^4.1.0",
"cross-env": "^5.2.0",
"cxlt-vue2-toastr": "^1.1.0",
"date-fns": "^1.30.1",
"debug": "^4.1.1",
"gsap": "^2.1.3",
"jquery": "^3.4.1",
"libphonenumber-js": "^1.7.14",
"moment": "^2.24.0",
"node-sass": "^4.13.1",
"nuxt": "^2.11.0",
"nuxt-facebook-pixel-module": "^1.3.0",
"nuxt-google-maps-module": "^1.6.0",
"nuxt-jsonld": "^1.4.5",
"nuxt-token-auth": "^1.0.2",
"nuxt-user-agent": "^1.2.2",
"sass-loader": "^7.1.0",
"vee-validate": "^2.2.0",
"vue": "^2.6.11",
"vue-gallery": "^2.0.0",
"vue-i18n": "^8.10.0",
"vue-infinite-scroll": "^2.0.2",
"vue-instantsearch": "^2.7.0",
"vue-js-modal": "^1.3.33",
"vue-lazyload": "^1.2.6",
"vue-mq": "^1.0.1",
"vue-multiselect": "^2.1.6",
"vue-read-more": "^1.1.1",
"vue-scrollto": "^2.15.0",
"vue-sticky": "^3.3.4",
"vue-tawk": "^1.0.1",
"vue-upload-component": "^2.8.20",
"vue-wait": "^1.3.3",
"vue2-dropzone": "^3.5.8",
"vue2-leaflet": "^1.2.3",
"vuedraggable": "^2.20.0",
"vuejs-datepicker": "^1.5.4",
"vuejs-paginate": "^2.1.0",
"vueperslides": "^2.7.0"
},
"devDependencies": {
"babel-eslint": "^8.2.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-loader": "^2.1.2",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"nodemon": "^1.18.10"
}
}
Probably problem with the webpack's watch mode.
As stated here:
For some systems, watching many file systems can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like node_modules
module.exports = {
//...
watchOptions: {
ignored: /node_modules/
}
};
In your case (nuxt.js), just add to nuxt.config.js
watchers: {
webpack: {
ignored: /node_modules/
}
}

heroku app crashes because of missing module, but works on localhost

I have an app that I successfully deployed to heroku, but when I try to access it, I get this screen...
The log says the following...
The error I believe is causing the issue is Error: Cannot find module 'mongoose'.
Here is my package.json for reference...
{
"name": "ovo",
"version": "1.0.0",
"description": "see and sort OVO in real time!",
"main": "server.js",
"scripts": {
"build": "webpack --config webpack.prod.config.js",
"dev": "concurrently -k \"npm run frontend\" \"npm run backend\"",
"frontend": "webpack -d --watch",
"backend": "nodemon server.js",
"start": "npm run build && NODE_ENV=production node server.js",
"test": "mocha --compilers js:babel-core/register ./test/**/*.js --require ignore-styles"
},
"engines": {
"node": "6.11.0",
"npm": "5.0.3"
},
"repository": {
"type": "git",
"url": "git+https://github.com/leojacoby/ovo.git"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.17.1",
"babel-core": "^6.24.1",
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.0",
"enzyme": "^2.8.1",
"expect": "^1.20.2",
"express": "^4.15.2",
"immutability-helper": "^2.6.5",
"mocha": "^3.2.0",
"mongoose": "^5.4.0",
"node-sass": "^4.5.2",
"prop-types": "^15.6.0",
"rc-slider": "^8.6.0",
"rc-tooltip": "^3.7.0",
"react": "^15.5.4",
"react-addons-update": "^15.6.2",
"react-bootstrap-table": "^4.3.1",
"react-bootstrap-table-next": "^0.1.3",
"react-dom": "^15.5.4",
"react-rangeslider": "^2.2.0",
"react-redux": "^5.0.5",
"redux": "^3.7.2",
"redux-devtools": "^3.4.0",
"redux-devtools-dock-monitor": "^1.1.2",
"redux-devtools-log-monitor": "^1.3.0",
"sass-loader": "^6.0.3",
"style-loader": "^0.16.1",
"webpack": "^2.3.3"
},
"devDependencies": {
"babel-eslint": "^7.2.2",
"concurrently": "^3.5.0",
"eslint": "^3.19.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"eslint-watch": "^3.1.0",
"ignore-styles": "^5.0.1",
"nodemon": "^1.11.0",
"react-addons-test-utils": "^15.5.1",
"react-test-renderer": "^15.5.4",
"webpack-dev-middleware": "^1.10.1",
"webpack-dev-server": "^2.4.2",
"webpack-hot-middleware": "^2.18.0"
},
"bugs": {
"url": "https://github.com/leojacoby/ovo/issues"
},
"homepage": "https://github.com/leojacoby/ovo#readme",
"directories": {
"test": "test"
},
"keywords": []
}
The 'mongoose' npm package is in my package.json, and everything works just fine when I run it on my localhost. Please let me know if you want any more information and thank you for reading!
Turns out I hadn't connected my github to my heroku. I was pushing to github but it was not updating heroku so I kept experiencing the same errors. This is what I had to enable in heroku and then my edits actually manifested in the heroku.
An alternative is to just type in git push heroku master into the terminal everytime.
The last thing I had to do was type in heroku config:set MONGODB_URI='mongodb://<name>:<password>#ds123050.mlab.com:23050/ovodb' into the terminal for heroku to access my environmental variable.
Are you pushing node_modules in your code? If yes try to delete that folder and let Heroku install all modules all over again.

Deploy error on Heroku with /app/karma.config.js

I got a React project with node.js, and want to deploy it on Heroku, I connect Heroku with my github repository: https://github.com/yeziyqf/SecureProgramConc
When the project building on Heroku, I got following error:
-----> Running Node.js buildpack tests...
essential-react#0.3.0 test /app
PHANTOMJS_BIN=./node_modules/.bin/phantomjs ./node_modules/karma/bin/karma start karma.config.js
07 03 2018 04:50:38.115:ERROR [config]: File /app/karma.config.js does not exist!
npm ERR! Test failed. See above for more details.
-----> Node.js buildpack tests failed with exit status 1
What is this problem? Locally I don't have this config file but my project works fine, anybody have a clue on it? Thanks!
Here is the package.json file:
{
"name": "essential-react",
"version": "0.3.0",
"description": "A minimal skeleton for building testable React apps using ES6.",
"main": "src/main.jsx",
"scripts": {
"postinstall": "npm run build",
"server": "node server.js",
"build": "webpack -p --config webpack.production.config.js",
"test": "PHANTOMJS_BIN=./node_modules/.bin/phantomjs ./node_modules/karma/bin/karma start karma.conf.js",
"test-cross-browser": "./node_modules/karma/bin/karma start karma.cross-browser.config.js",
"coveralls": "cat coverage/lcov.info | coveralls",
"clean": "rm build/app.js"
},
"repository": {
"type": "git",
"url": "https://github.com/pheuter/essential-react.git"
},
"keywords": [
"skeleton",
"template",
"react",
"quickstart"
],
"author": "Mark Fayngersh",
"license": "MIT",
"bugs": {
"url": "https://github.com/pheuter/essential-react/issues"
},
"homepage": "https://github.com/pheuter/essential-react",
"devDependencies": {
"coveralls": "^2.11.2",
"istanbul": "^0.3.7",
"istanbul-instrumenter-loader": "^0.1.2",
"karma": "^0.13.22",
"karma-coverage": "^0.2.7",
"karma-mocha": "^0.1.10",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sauce-launcher": "^0.2.10",
"karma-sinon-chai": "^0.3.0",
"karma-webpack": "^1.5.0",
"phantomjs": "^1.9.16",
"react-hot-loader": "^1.2.3",
"react-scripts": "0.2.1",
"webpack-dev-server": "^1.7.0"
},
"dependencies": {
"autoprefixer": "^6.0.2",
"babel-core": "^5.4.7",
"babel-loader": "^5.1.3",
"bootstrap": "^3.3.5",
"bootstrap-social": "^4.9.1",
"bundle-loader": "^0.5.4",
"classnames": "^2.2.0",
"css-loader": "^0.28.9",
"express": "^4.12.3",
"extract-text-webpack-plugin": "^0.8.2",
"file-loader": "^0.8.4",
"firebase": "^4.10.0",
"font-awesome": "^4.4.0",
"history": "^1.13.0",
"jquery": "^2.1.4",
"lazy": "^1.0.11",
"less": "^2.5.3",
"less-loader": "^2.2.1",
"normalizr": "^1.1.0",
"nprogress": "^0.2.0",
"postcss-loader": "^0.6.0",
"postcss-nested": "^1.0.0",
"react": "^0.14.9",
"react-addons-css-transition-group": "^0.14.1",
"react-addons-transition-group": "^0.14.2",
"react-addons-update": "^15.3.0",
"react-bootstrap": "^0.27.0",
"react-dom": "^0.14.1",
"react-native-multiple-choice": "0.0.8",
"react-redux": "^5.0.7",
"react-router": "^1.0.0-rc2",
"react-router-redux": "^4.0.8",
"react-select": "^1.2.1",
"redux": "^3.7.2",
"resource-api-utils": "^1.0.0",
"style-loader": "^0.12.3",
"url-loader": "^0.5.6",
"webpack": "^1.12.1"
}
}

Resources