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/
}
}
Related
I am using a react dashboard template from themeforest. Here is the package.json content:
{
"name": "acorn-react",
"version": "1.0.1",
"private": true,
"proxy": "http://localhost:3000",
"dependencies": {
"#emoji-mart/data": "^1.0.2",
"#fullcalendar/bootstrap": "^5.9.0",
"#fullcalendar/daygrid": "^5.9.0",
"#fullcalendar/interaction": "^5.9.0",
"#fullcalendar/react": "^5.9.0",
"#fullcalendar/timegrid": "^5.9.0",
"#glidejs/glide": "^3.4.1",
"#reduxjs/toolkit": "^1.6.0",
"#testing-library/jest-dom": "^5.13.0",
"#testing-library/react": "^11.2.7",
"#testing-library/user-event": "^13.1.9",
"#yaireo/tagify": "^4.12.0",
"autosuggest-trie": "^2.1.1",
"axios": "^0.21.1",
"axios-mock-adapter": "^1.19.0",
"chart.js": "^3.5.1",
"chartjs-adapter-luxon": "^1.0.0",
"chartjs-plugin-crosshair": "^1.2.0",
"chartjs-plugin-datalabels": "^2.0.0",
"chartjs-plugin-streaming": "^2.0.0",
"clamp-js": "^0.7.0",
"classnames": "^2.3.1",
"date-fns": "^2.22.1",
"emoji-mart": "3.0",
"formik": "^2.2.9",
"fuse.js": "^6.4.6",
"intro.js": "^4.2.2",
"intro.js-react": "^0.5.0",
"luxon": "^2.0.1",
"overlayscrollbars": "^1.13.1",
"overlayscrollbars-react": "^0.2.3",
"pixabay-api": "^1.0.4",
"plyr-react": "^3.0.8",
"quill": "^1.3.7",
"rc-slider": "^9.7.2",
"react": "^16.13.0",
"react-autosuggest": "^10.1.0",
"react-bootstrap": "^2.0.0-rc.0",
"react-circular-progressbar": "^2.0.4",
"react-contexify": "^5.0.0",
"react-countdown": "^2.3.2",
"react-datepicker": "^4.1.1",
"react-datetime": "^3.1.1",
"react-dom": "^16.13.0",
"react-dropzone-uploader": "^2.11.0",
"react-flow-renderer": "^9.6.2",
"react-fuzzy-highlighter": "^1.0.0",
"react-helmet": "^6.1.0",
"react-hook-mousetrap": "^2.0.4",
"react-image-lightbox": "^5.1.4",
"react-intl": "^5.20.2",
"react-masonry-css": "^1.0.16",
"react-number-format": "^4.6.4",
"react-paginate": "^8.1.3",
"react-rating": "^2.0.5",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-select": "^4.3.1",
"react-simple-maps": "^3.0.0",
"react-slick": "^0.29.0",
"react-sortablejs": "^6.0.0",
"react-syntax-highlighter": "^15.4.4",
"react-table": "^7.7.0",
"react-tag-autocomplete": "^6.2.0",
"react-tenor": "^2.2.0",
"react-toastify": "^7.0.4",
"react-tooltip": "^4.2.21",
"react-world-flags": "^1.5.0",
"redux-undo": "^1.0.1",
"reduxjs-toolkit-persist": "^7.0.1",
"slick-carousel": "^1.8.1",
"sortablejs": "^1.14.0",
"web-vitals": "^0.2.4",
"yup": "^0.32.9"
},
"scripts": {
"start-js": "react-scripts start --dev",
"start-css": "sass --style=compressed --watch
src/sass/styles.scss:public/css/styles.css",
"start": "concurrently \"npm run start-js\" \"npm run start-css\"",
"build-js": "react-scripts build --prod",
"build-css": "sass --style=compressed --no-source-map
src/sass/styles.scss:public/css/styles.css",
"build": "concurrently \"npm run build-css\" \"npm run build-js\"",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint ./src/**/*.js",
"lint:fix": "eslint ./src --fix",
"precommit": "lint-staged",
"concurrently": "concurrently"
},
"eslintConfig": {
"extends": [
"react-app"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write",
"git add"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#babel/core": "^7.18.2",
"#babel/preset-env": "^7.18.2",
"#babel/preset-react": "^7.17.12",
"babel-loader": "^8.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"concurrently": "^6.2.0",
"eslint": "^7.28.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"prettier": "2.3.1",
"sass": "^1.42.1"
}
}
After I run npm start, it takes about a minute or two until I see Starting the development server and localhost starts loading in browser. And then it takes about 30 minutes until the page is loaded. (Yes 30 minutes!) . I know that the list of dependency is quite long but still I expect it to start in maximum 5 minutes. I have searched a lot for similar issues and tried to apply the suggested solutions:
Allocated more memory: --max_old_space_size=4096
Updated nodejs and npm
Closed all browser tabs before starting the app
Notes:
When I ran npm install there were dependency errors, so I had to do npm install --force
I am running this on Windows 10 , my pc has 8GB of RAM.
Thanks to everyone who will help!
I think the problem is not with the package.json. the problem is you have something that makes it slower, which is the package prettier, the same thing happened to me, the problem was the prettier package that made my app slow by taking too much time in analyzing the format and makes the format better according to the language, so this process takes times, having too much files and prettier checks all of the file again and again, the more files you have the more time it will take. So i recommend removing prettier. You can just download a vscode extension of prettier that does the job better.
every time I try to launch the generate for my nuxt project on gitlab, I get back for every page generated a strange error,
[error] /Dashboard
TypeError: external_defu_ is not a function
at server.js:12669:45
at Array.reduce (<anonymous>)
at new runtime_BaseScheme (node_modules/#nuxtjs/auth-next/dist/runtime.mjs:883:0)
at new runtime_Oauth2Scheme (node_modules/#nuxtjs/auth-next/dist/runtime.mjs:1137:0)
at auth (node_modules/.cache/nuxt/auth.js:45:0)
at createApp (node_modules/.cache/nuxt/index.js:291:0)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:526:9)
at processTimers (node:internal/timers:500:7)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
This prevents the page from generating itself correctly.
While if I launch the project locally, with the same version of node, it generates everything correctly.
Do you know how I can solve the problem?
In gitlab's docker I'm using node v12.16.3.
This is my package.json
{
"name": "xxx",
"version": "1.0.0",
"description": "xxx",
"author": "Alessandro",
"private": true,
"scripts": {
"generate": "ENV=production nuxt generate",
generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
},
"dependencies": {
"#nuxtjs/auth": "^4.9.1",
"#nuxtjs/auth-next": "5.0.0-1613647907.37b1156",
"#nuxtjs/axios": "^5.13.1",
"#nuxtjs/pwa": "^3.3.4",
"#vue/composition-api": "^0.6.7",
"aws-sdk": "^2.610.0",
"axios": "^0.21.1",
"bcryptjs": "^2.4.3",
"browser-image-compression": "^1.0.14",
"caniuse-lite": "^1.0.30001257",
"chart.js": "^2.9.3",
"child_process": "^1.0.2",
"compass": "^0.1.1",
"cookie": "^0.4.0",
"cookie-universal-nuxt": "^2.1.4",
"cors": "^2.8.5",
"cross-fetch": "^3.1.5",
"file-saver": "^2.0.2",
"fs": "0.0.1-security",
"gapi-script": "^1.2.0",
"install": "^0.13.0",
"js-cookie": "^2.2.1",
"kaleidoscopejs": "1.0.18",
"leaflet": "^1.6.0",
"lodash": "^4.17.15",
"md5": "^2.2.1",
"moment": "^2.29.3",
"multer": "^1.4.2",
"net": "^1.0.2",
"node-fetch": "^2.6.7",
"node-orientdb-http": "^0.1.1",
"npm": "^8.13.1",
"nuxt": "^2.15.0",
"nuxt-gmaps": "^1.2.10",
"nuxt-i18n": "^6.3.0",
"nuxt-leaflet": "0.0.19",
"nuxt-sass-resources-loader": "^2.0.5",
"p-iteration": "^1.1.8",
"pannellum": "github:saidmoya12/pannellum",
"panolens": "^0.12.1",
"proxy": "^1.0.2",
"readline": "^1.3.0",
"simple-analytics-vue": "^1.1.5",
"tls": "0.0.1",
"videojs": "^1.0.0",
"videojs-panorama": "^0.1.7",
"vue": "2.6.14",
"vue-chartjs": "^3.5.0",
"vue-cookie-accept-decline": "^5.3.1",
"vue-expandable-image": "^0.1.0",
"vue-google-login": "^2.0.3",
"vue-pannellum": "^0.5.3",
"vue-plausible": "^1.2.1",
"vue-rangedate-picker": "^1.0.0",
"vue-rangedate-picker-winslow": "^1.0.8",
"vue-server-renderer": "^2.6.12",
"vue-template-compiler": "^2.6.12",
"vue-tooltipster": "^1.2.0",
"vue-upload-multiple-image": "^1.1.4",
"vue2-google-maps": "^0.10.7",
"vue2-leaflet": "^2.6.0",
"vuedraggable": "^2.23.2",
"vuejs-panorama": "^1.1.9",
"vuejs-vr": "^1.2.2",
"vuetify": "^2.5.12",
"vuex-persistedstate": "^3.0.1",
"webpack": "^4.45.0"
},
"devDependencies": {
"#aceforth/nuxt-optimized-images": "^1.4.0",
"#nuxt/bridge": "npm:#nuxt/bridge-edge#^3.0.0-27268729.5b8e10f",
"#nuxt/image": "^0.7.1",
"#nuxt/types": "^2.14.12",
"#nuxtjs/dotenv": "^1.4.1",
"#nuxtjs/eslint-config": "^3.1.0",
"#nuxtjs/eslint-module": "^2.0.0",
"#nuxtjs/google-analytics": "^2.4.0",
"#nuxtjs/vuetify": "^1.12.3",
"babel-eslint": "^10.0.1",
"eslint": "^7.5.0",
"eslint-plugin-nuxt": ">=0.4.2",
"imagemin-gifsicle": "^7.0.0",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.2",
"imagemin-svgo": "^9.0.0",
"lqip-loader": "^2.2.1",
"responsive-loader": "^2.3.0",
"rimraf": "^3.0.2",
"sharp": "^0.30.7",
"sqip-loader": "^1.0.0",
"webp-loader": "^0.6.0"
}
}
Thank you very much
Alessandro
I also had this issue on Nuxt2 Bridge using #nuxtjs/auth-next. The solution is to transpile defu during the build:
nuxt.config.js
export default defineNuxtConfig({
// ...
build: {
transpile: [
'defu',
],
},
})
The issue and possible solutions are described in the docs: https://v3.nuxtjs.org/guide/going-further/esm/
When I do npm link like this in Window 10:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react
In my app when I do import { useSnackbar } from 'notistack'; then I can use the notistack ok, and it's the global notistack. I want to modify it debug it locally so I forked it and did the npm link but when I npm start the the App get the "You might have more than one copy of React in the same app " error. I also test this and it's true so that's why I do the npm link react and it's also recommended so I don't know what I do wrong here
To be able to debug notistack in VSCode and use the notistack in my app in VSCode. I do npm link. I get the Duplicate React error so must npm link the App react version and tell notistack to us the app react.
But I get this error: I do this npm link on other library's without problem but now this error:
I have tried to fixed this but it's not working.
I also do:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react-dom
And that is resolving ok.
I fork the notistack library and is using it ok in the app but only when I do npm link it fails. What is the problem here I guess it's in the package.json
Here is the package.json for the forked library notistack:
{
"name": "notistack",
"version": "1.0.10",
"description": "Highly customizable notification snackbars (toasts) that can be stacked on top of each other",
"main": "dist/index.js",
"module": "dist/notistack.esm.js",
"types": "dist/index.d.ts",
"license": "MIT",
"author": {
"name": "Hossein Dehnokhalaji",
"email": "hossein.dehnavi98#yahoo.com",
"url": "https://github.com/iamhosseindhv/notistack"
},
"homepage": "https://www.iamhosseindhv.com/notistack",
"repository": {
"url": "git+https://github.com/iamhosseindhv/notistack.git",
"type": "git"
},
"scripts": {
"build": "tsdx build --transpileOnly --entry ./src/index.js",
"prebuild": "npm run docs",
"prepublishOnly": "npm run build",
"docs": "rimraf typedoc.json && typedoc --tsconfig",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"peerDependencies": {
"#material-ui/core": "^4.11.2",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"#babel/preset-react": "^7.8.3",
"#material-ui/core": "^4.9.5",
"#types/node": "^13.9.0",
"#types/react": "^16.9.23",
"#types/react-dom": "^16.9.5",
"#types/react-is": "^16.7.1",
"#typescript-eslint/eslint-plugin": "^3.9.1",
"#typescript-eslint/parser": "^3.9.1",
"babel-plugin-optimize-clsx": "^2.6.1",
"eslint": "^7.7.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"rimraf": "^3.0.2",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-copy": "^3.3.0",
"tsdx": "^0.13.2",
"typedoc": "^0.16.11",
"typescript": "^3.8.3"
},
"dependencies": {
"clsx": "^1.1.0",
"hoist-non-react-statics": "^3.3.0"
},
"bugs": {
"url": "https://github.com/iamhosseindhv/notistack/issues"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/notistack"
},
"contributors": [
"Hossein Dehnokhalaji (https://www.iamhosseindhv.com/)"
],
"keywords": [
"notistack",
"enqueueSnackbar",
"snackbarprovider",
"useSnackbar",
"multiple",
"react",
"javascript",
"material-ui",
"toast",
"redux",
"snackbar",
"stacked",
"notification",
"material design",
"hossein",
"dehnokhalaji",
"iamhosseindhv"
]
}
Here is the package.json for the app using the library:
{
"name": "greta-thunberg-fff",
"version": "1.2.9",
"private": true,
"homepage": "https://greta.portplays.com",
"main": "index.js",
"module": "dist/index.js",
"files": [
"dist",
"README.md"
],
"dependencies": {
"#material-ui/core": "^4.11.2",
"#material-ui/icons": "^4.11.2",
"#material-ui/lab": "^4.0.0-alpha.57",
"#material-ui/styles": "^4.11.2",
"axios": "^0.19.2",
"bootstrap": "^4.5.2",
"change-case": "^4.1.2",
"classnames": "^2.3.1",
"clean-tag": "^3.1.1",
"clsx": "^1.1.1",
"comma-separated-values": "^3.6.4",
"crypto-js": "^4.0.0",
"date-fns": "^2.23.0",
"faker": "^5.5.3",
"firebase": "^7.23.0",
"formik": "^2.2.5",
"framer-motion": "^2.9.5",
"gsap": "^3.5.1",
"history": "^5.0.0",
"i": "^0.3.6",
"lodash": "^4.17.19",
"lodash.debounce": "^4.0.8",
"mammoth": "^1.4.11",
"material-table": "^1.69.2",
"moment": "^2.27.0",
"normalize-wheel": "^1.0.1",
"notistack": "^1.0.10",
"npm": "^7.11.2",
"pdfjs-dist": "^1.8.357",
"preval.macro": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-activity": "^1.2.2",
"react-bootstrap": "^1.3.0",
"react-chartjs-2": "^2.11.1",
"react-data-grid": "^6.1.0",
"react-detect-offline": "^2.4.0",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.4",
"react-helmet": "^6.1.0",
"react-motion": "^0.5.2",
"react-perfect-scrollbar": "^1.5.8",
"react-redux": "^7.2.5",
"react-resize-detector": "^5.0.7",
"react-router": "^6.0.0-beta.4",
"react-router-dom": "^6.0.0-beta.4",
"react-scripts": "^3.4.0",
"react-slick": "^0.27.3",
"react-spring": "^8.0.27",
"react-transition-group": "^4.4.1",
"react-visibility-sensor": "^5.1.1",
"rebass": "^4.0.7",
"recompose": "^0.30.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"sass": "^1.41.1",
"simplebar-react": "^2.3.5",
"slick-carousel": "^1.8.1",
"styled-components": "^5.1.1",
"styled-system": "^5.1.5",
"three": "^0.85.2",
"typescript": "^3.9.7",
"uuid": "^8.3.1",
"xlsx": "^0.10.1",
"yup": "^0.32.1"
},
"scripts": {
"start": "set PORT=6545&& react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -b master -d build"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^4.1.1",
"#typescript-eslint/parser": "^4.1.1",
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"clean-tag": "^3.1.1",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"gh-pages": "^2.0.1",
"prettier": "^2.1.1",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-scripts": "^3.4.3",
"rebass": "^4.0.7",
"styled-system": "^5.1.5"
}
}
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"
}
}
This started today after saving the react-addons-css-transition-group npm package as a dependency.
I then went down a rabbit hole of updating, adding & removing various dependencies as well as making sure all the react-related dependencies share the same versioning. I think I'm back to where I was before adding the react-addons-css-transition-group dependency, aside from updates, but I'm still getting this error and I can't find anything online relating to it specifically.
package.json if that helps:
{
"name": "",
"version": "0.1.0",
"author": "",
"description": "",
"license": "MIT",
"repository": {
"type": "git",
"url": ""
},
"main": "server.js",
"scripts": {
"lint": "eslint --ext .js,.jsx --ignore-pattern public",
"start": "brunch watch --server",
"knex": "knex",
"heroku-postbuild": "brunch build --production; knex migrate:latest",
"nf": "nf start"
},
"dependencies": {
"auto-reload-brunch": "^2.7.1",
"axios": "^0.14.0",
"babel-brunch": "^6.0.5",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"bcrypt": "^0.8.7",
"bcrypt-as-promised": "^1.1.0",
"body-parser": "^1.15.2",
"boom": "^4.0.0",
"brunch": "^2.9.1",
"clean-css-brunch": "^2.0.0",
"cookie-parser": "^1.4.3",
"dotenv": "^2.0.0",
"express": "^4.14.0",
"express-validation": "^1.0.1",
"humps": "^1.1.0",
"javascript-brunch": "^2.0.0",
"joi": "^9.0.4",
"jsonwebtoken": "^7.1.9",
"knex": "^0.12.0",
"material-ui": "^0.16.3",
"morgan": "^1.7.0",
"multer": "1.1.0",
"pg": "^6.1.0",
"react": "^15.4.1",
"react-cookie": "^0.4.8",
"react-dom": "^15.4.1",
"react-router": "^2.8.0",
"react-tap-event-plugin": "^2.0.0",
"sass-brunch": "^2.7.0",
"weak-key": "^1.0.0",
"xml2js": "^0.4.17"
},
"devDependencies": {
"eslint": "^3.2.2",
"eslint-config-ryansobol": "^8.0.0",
"foreman": "^2.0.0"
},
"engines": {
"node": "7.2.0"
}
}
I was able to resolve this issue by deleting the node-modules folder and re-importing all dependencies.
My dependencies and devDependencies sections look like that after the re-import:
"dependencies": {
"lodash": "^4.17.2",
"material-ui": "^0.16.5",
"react": "^15.4.1",
"react-addons-perf": "^15.4.1",
"react-addons-test-utils": "^15.4.1",
"react-dom": "^15.4.1",
"react-tap-event-plugin": "^2.0.1"
},
"devDependencies": {
"auto-reload-brunch": "^2.0.0",
"babel-brunch": "~6.0.0",
"babel-preset-es2015": "~6.9.0",
"babel-preset-react": "~6.11.1",
"brunch": "^2.4.0",
"clean-css-brunch": "^2.0.0",
"css-brunch": "^2.0.0",
"javascript-brunch": "^2.0.0",
"uglify-js-brunch": "^2.0.0"
}
This is caused by a Brunch bug.
We added a workaround in React 15.4.2 but can’t guarantee it won’t break again.