I cant deploy my angular.js app to Heroku. I keep getting the following error. I can however run it locally with grunt serve or do a grunt build. I am using the heroku buildpack https://github.com/adamgoldstein/heroku-buildpack-nodejs-grunt-compass to get compass working. if I dont use the buildpack I get the warning 'Warning: Couldn't find the compass binary.'
remote: Running "wiredep:app" (wiredep) task
remote: Warning: Error: bootstrap-sass-official is not installed. Try running `bower install`. Use --force to continue.
remote:
remote: Aborted due to warnings.
remote:
remote:
remote: Execution Time (2015-09-17 14:11:30 UTC)
remote: loading tasks 332ms ▇▇▇▇▇▇▇▇▇ 18%
remote: clean:dist 130ms ▇▇▇▇ 7%
remote: wiredep:app 1.4s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 76%
remote: Total 1.9s
remote:
remote:
remote: ! Push rejected, failed to compile Node.js app
I have cleaned and re-installed both my node_modules and my bower packages by running npm install and bower install.
This is my bower.json dependencies list:
"dependencies": {
"angular": "^1.3.0",
"bootstrap-sass-official": "^3.2.0",
"angular-animate": "^1.3.0",
"angular-aria": "^1.3.0",
"angular-cookies": "^1.3.0",
"angular-messages": "^1.3.0",
"angular-resource": "^1.3.0",
"angular-route": "^1.3.0",
"angular-sanitize": "^1.3.0",
"angular-touch": "^1.3.0",
"ngInfiniteScroll": "~1.2.0",
"angular-moment": "~0.9.2",
"userapp-angular": "~2.0.4",
"ui-bootstrap": "~0.12.1",
"angular-ui-router": "~0.2.13",
"modernizr": "~2.8.3",
"angular-bootstrap": "~0.13.0",
"angular-xeditable": "~0.1.9",
"ngtoast": "~1.5.2",
"restangular": "~1.5.1",
"jquery-bridget": "~1.1.0",
"angular-rangeslider": "~0.0.13",
"angular-auto-focus": "~1.0.3",
"angular-masonry": "~0.11.0",
"angular-masonry-directive": "*",
"angular-rt-popup": "~1.0.6"
},
"devDependencies": {
"angular-mocks": "^1.3.0"
},
and my package.json dependencies:
{
"name": "angularnews",
"version": "0.0.0",
"dependencies": {
"angular": "^1.3.x",
"bower": "~1.4.1",
"compass": "^0.1.1",
"express": "~4.12.3",
"generator-angular": "~0.11.1",
"generator-karma": "~1.0.0",
"grunt-cli": "~0.1.13",
"gzippo": "~0.2.0",
"morgan": "~1.5.2",
"yo": "~1.4.6"
},
"repository": {},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^2.0.0",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-compass": "^1.0.3",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-cssmin": "^0.12.0",
"grunt-contrib-htmlmin": "^0.4.0",
"grunt-contrib-imagemin": "^0.9.2",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^2.1.2",
"grunt-google-cdn": "^0.4.3",
"grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^0.9.2",
"grunt-svgmin": "^2.0.0",
"grunt-usemin": "^3.0.0",
"grunt-wiredep": "^2.0.0",
"jshint-stylish": "^1.0.0",
"load-grunt-tasks": "^3.1.0",
"time-grunt": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test",
"postinstall": "bower cache clean && bower install"
}
}
Any ideas?
Adding the https://github.com/heroku/heroku-buildpack-nodejs buildpack to heroku solved my problem.
Related
I have a laravel 8 app and i'm running react on it. I have successfully built my application but now I need to compile my app for production, but it keeps failing whenever I run npm run prod. And I believe it has something to do with my react redux. It can't seem to handle that type of file configuration whenever I try to compile for production. Meanwhile npm run watch still works perfectly fine.
Here's the error:
C:\xampp\htdocs\pro-oms>npm run prod
> enlite_prime#1.4.3 prod C:\xampp\htdocs\pro-oms
> npm run production
> enlite_prime#1.4.3 production C:\xampp\htdocs\pro-oms
> cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
ERROR Failed to compile with 1 errors 17:32:19
error in ./resources/js/components/app.js
Module parse failed: Unexpected token (41:4)
You may need an appropriate loader to handle this file type.
| const render = messages => {
| ReactDOM.render(
> <Provider store={store}>
| <LanguageProvider messages={messages}>
| <ConnectedRouter history={history}>
# ./resources/js/app.js 15:0-30
# multi ./resources/js/app.js ./resources/sass/app.scss
3 assets
ERROR in ./resources/js/components/app.js 41:4
Module parse failed: Unexpected token (41:4)
You may need an appropriate loader to handle this file type.
| const render = messages => {
| ReactDOM.render(
> <Provider store={store}>
| <LanguageProvider messages={messages}>
| <ConnectedRouter history={history}>
# ./resources/js/app.js 15:0-30
# multi ./resources/js/app.js ./resources/sass/app.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! enlite_prime#1.4.3 production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the enlite_prime#1.4.3 production 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! C:\Users\KALU KECHUKWU EA\AppData\Roaming\npm-cache\_logs\2020-12-21T16_32_26_115Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! enlite_prime#1.4.3 prod: `npm run production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the enlite_prime#1.4.3 prod 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! C:\Users\username\AppData\Roaming\npm-cache\_logs\2020-12-21T16_32_26_214Z-debug.log
Here's my package.json:
{
"name": "enlite_prime",
"version": "1.4.3",
"description": "React.js fullstack web template for expert and experienced fullstack developer",
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"browserslist": [
"last 2 versions",
"> 1%",
"IE 10"
],
"lint-staged": {
"*.js": [
"npm run lint:eslint:fix",
"git add --force"
],
"*.json": [
"prettier --write",
"git add --force"
]
},
"pre-commit": "lint:staged",
"resolutions": {
"babel-core": "7.0.0-bridge.0"
},
"dllPlugin": {
"path": "node_modules/react-boilerplate-dlls",
"exclude": [
"#types/googlemaps",
"#types/markerclustererplus",
"autosuggest-highlight",
"chalk",
"compression",
"convert-source-map",
"cross-env",
"dotenv",
"etag",
"express",
"fs",
"ip",
"jsdom",
"minimist",
"mocha",
"moment",
"sanitize.css",
"serve-favicon",
"slick-carousel",
"tunnel-agent"
],
"include": [
"core-js",
"lodash",
"eventsource-polyfill"
]
},
"dependencies": {
"#babel/plugin-proposal-class-properties": "^7.8.3",
"#babel/plugin-proposal-export-default-from": "^7.2.0",
"#babel/plugin-proposal-object-rest-spread": "^7.2.0",
"#babel/polyfill": "7.4.3",
"#date-io/date-fns": "^1.3.11",
"#date-io/moment": "1.3.8",
"#material-ui/core": "^4.7.0",
"#material-ui/icons": "^4.5.1",
"#material-ui/lab": "^4.0.0-alpha.33",
"#material-ui/pickers": "^3.2.8",
"#types/googlemaps": "^3.38.1",
"#types/markerclustererplus": "^2.1.33",
"acorn": "^6.1.1",
"autosuggest-highlight": "^3.1.1",
"axios": "^0.19.0",
"bourbon": "^5.1.0",
"bourbon-neat": "^3.0.0",
"chalk": "^2.4.1",
"classnames": "^2.2.6",
"compression": "1.7.4",
"connected-react-router": "6.6.1",
"cross-env": "5.2.0",
"date-fns": "2.1.0",
"detect-browser": "^3.0.0",
"dotenv": "^6.0.0",
"downshift": "^1.31.12",
"draft-js": "^0.10.5",
"draft-js-inline-toolbar-plugin": "^3.0.0",
"draft-js-plugins-editor": "^2.1.1",
"draftjs-to-html": "^0.8.3",
"draftjs-to-markdown": "^0.5.1",
"express": "4.16.4",
"firebase": "^7.24.0",
"fontfaceobserver": "2.0.13",
"fs": "0.0.1-security",
"history": "4.7.2",
"hoist-non-react-statics": "3.0.1",
"immutable": "3.8.2",
"intl": "1.2.5",
"invariant": "2.2.4",
"ip": "1.1.5",
"jsdom": "^13.0.0",
"jss": "^10.0.0",
"jss-rtl": "^0.3.0",
"keycode": "^2.2.0",
"lodash": "^4.17.15",
"lru-memoize": "^1.0.2",
"marked": "^1.2.7",
"minimist": "1.2.0",
"mocha": "^6.1.4",
"moment": "^2.22.2",
"mui-datatables": "^2.13.1",
"prop-types": "15.7.2",
"rcolor": "^1.0.1",
"react": "16.8.6",
"react-anchor-link-smooth-scroll": "^1.0.11",
"react-autosuggest": "^9.3.4",
"react-calendar": "^2.17.4",
"react-clock": "^2.3.0",
"react-countup": "^3.0.3",
"react-dom": "16.8.6",
"react-draft-wysiwyg": "^1.12.13",
"react-dropzone": "^10.2.1",
"react-event-listener": "^0.6.1",
"react-google-maps": "^9.4.5",
"react-helmet": "6.0.0-beta",
"react-intl": "2.8.0",
"react-ionicons": "^2.1.6",
"react-jss": "^10.0.0",
"react-loadable": "5.5.0",
"react-loading-bar": "0.0.7",
"react-markdown": "^3.1.5",
"react-modal": "^3.4.4",
"react-number-format": "^3.3.4",
"react-popper": "^0.10.4",
"react-redux": "^7.0.2",
"react-router-dom": "^5.0.1",
"react-scrollspy": "^3.3.5",
"react-select": "^3.0.4",
"react-slick": "^0.23.1",
"react-spring": "^8.0.27",
"react-swipeable-views": "^0.12.13",
"react-syntax-highlighter": "^7.0.0",
"react-text-mask": "^5.3.2",
"recharts": "^1.4.2",
"recompose": "^0.28.2",
"redux": "4.0.1",
"redux-form": "8.2.0",
"redux-immutable": "4.0.0",
"redux-saga": "1.0.2",
"redux-saga-firebase": "^0.15.0",
"reselect": "4.0.0",
"sanitize.css": "8.0.0",
"serve-favicon": "^2.4.5",
"sinon": "^7.3.2",
"slick-carousel": "^1.8.1",
"tunnel-agent": "^0.6.0",
"warning": "4.0.2"
},
"devDependencies": {
"#babel/cli": "7.4.3",
"#babel/core": "7.4.3",
"#babel/plugin-proposal-class-properties": "7.4.0",
"#babel/plugin-syntax-dynamic-import": "7.2.0",
"#babel/plugin-transform-modules-commonjs": "7.4.3",
"#babel/plugin-transform-react-constant-elements": "7.2.0",
"#babel/plugin-transform-react-inline-elements": "7.2.0",
"#babel/preset-env": "7.4.3",
"#babel/preset-react": "7.0.0",
"#babel/register": "7.4.0",
"add-asset-html-webpack-plugin": "3.1.1",
"axios": "^0.19",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-loader": "8.0.5",
"babel-plugin-dynamic-import-node": "2.2.0",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-react-intl": "3.0.1",
"babel-plugin-react-transform": "3.0.0",
"babel-plugin-styled-components": "^1.10.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"bootstrap": "^4.0.0",
"chai": "^4.2.0",
"circular-dependency-plugin": "5.0.2",
"compare-versions": "3.4.0",
"compression-webpack-plugin": "2.0.0",
"coveralls": "3.0.2",
"cross-env": "^7.0",
"css-loader": "3.4.2",
"enzyme": "3.7.0",
"enzyme-adapter-react-16": "1.6.0",
"enzyme-to-json": "3.3.4",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-config-prettier": "4.1.0",
"eslint-import-resolver-webpack": "0.11.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-flowtype": "^3.2.0",
"eslint-plugin-import": "2.17.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-redux-saga": "1.0.0",
"eventsource-polyfill": "0.9.6",
"exports-loader": "0.7.0",
"file-loader": "3.0.1",
"happypack": "^5.0.1",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"imports-loader": "0.8.0",
"jquery": "^3.2",
"laravel-mix": "^5.0.1",
"lint-staged": "8.1.5",
"lodash": "^4.17.19",
"ngrok": "3.1.1",
"node-plop": "0.18.0",
"node-sass": "^4.14.1",
"null-loader": "0.1.1",
"offline-plugin": "5.0.6",
"optimize-css-assets-webpack-plugin": "^5.0.0",
"plop": "2.3.0",
"popper.js": "^1.12",
"postcss-loader": "3.0.0",
"pre-commit": "1.2.2",
"prettier": "1.17.0",
"prismjs": "^1.11.0",
"raw-loader": "2.0.0",
"react-app-polyfill": "0.2.2",
"react-test-renderer": "16.8.6",
"resolve-url-loader": "^3.1.0",
"rimraf": "2.6.3",
"sass": "^1.15.2",
"sass-loader": "^8.0.0",
"sass-material-colors": "0.0.5",
"shelljs": "^0.8.3",
"style-loader": "0.23.1",
"stylelint": "10.0.1",
"stylelint-config-recommended": "2.2.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-processor-styled-components": "1.6.0",
"svg-url-loader": "2.3.2",
"terser-webpack-plugin": "1.2.3",
"url-loader": "1.1.2",
"webpack": "4.30.0",
"webpack-cli": "3.3.0",
"webpack-dev-middleware": "3.6.2",
"webpack-hot-middleware": "2.24.3 ",
"webpack-pwa-manifest": "4.0.0",
"whatwg-fetch": "3.0.0"
}
}
Here's my webpack.mix.js:
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
output: {
publicPath: '/pro-oms/public/'
}
})
.react('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
I was able to fix my problem by replacing my .babelrc file with a babel.config.js file.
module.exports = {
presets: [
[
'#babel/preset-env',
{
modules: false,
},
],
'#babel/preset-react',
],
plugins: [
'styled-components',
'#babel/plugin-proposal-class-properties',
'#babel/plugin-syntax-dynamic-import',
'#babel/plugin-proposal-export-default-from'
]
};
When I run npm install to install packages I got this error :
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run npm install to fix them.
npm ERR! Missing: bootstrap-duallistbox#github:istvan-ujjmeszaros/bootstrap-duallistbox
npm ERR! A complete log of this run can be found in:
npm ERR! /home/--/.npm/_logs/2018-09-25T10_34_06_085Z-debug.log
And this is my package.json file :
{
"name": "smartadmin-reactjs",
"version": "1.2.4",
"description": "Smartadmin ReactJs template",
"main": "index.js",
"scripts": {
"build": "./node_modules/.bin/webpack --config webpack.config.js --progress --colors --env production",
"build-dev": "./node_modules/.bin/webpack --config webpack.config.js --progress --colors --env development",
"dev": "./node_modules/.bin/webpack-dev-server --config webpack.config.js --progress --env development"
},
"repository": {
"type": "git",
"url": "git+https://smartadmin-reactjs#bitbucket.org/smartadmin-dev/smartadmin-reactjs.git"
},
"keywords": [],
"author": "griga",
"license": "ISC",
"homepage": "https://bitbucket.org/smartadmin-dev/smartadmin-reactjs#readme",
"dependencies": {
"X-editable": "github:vitalets/x-editable",
"bootstrap": "3.3.7",
"bootstrap-colorpicker": "2.5.1",
"bootstrap-duallistbox": "github:istvan-ujjmeszaros/bootstrap-duallistbox",
"bootstrap-markdown": "2.10.0",
"bootstrap-progressbar": "0.9.0",
"bootstrap-slider": "9.8.0",
"bootstrap-tagsinput": "0.7.1",
"bootstrap-timepicker": "0.5.2",
"bootstrap4-duallistbox": "github:istvan-ujjmeszaros/bootstrap-duallistbox",
"chart.js": "2.6.0",
"classnames": "2.2.5",
"clockpicker": "0.0.7",
"clone": "2.1.1",
"core-js": "2.4.1",
"debounce": "1.0.2",
"dropzone": "5.0.1",
"dygraphs": "1.1.1",
"fuelux": "3.16.0",
"he": "1.1.1",
"highcharts": "5.0.12",
"ion-rangeslider": "2.1.7",
"jquery": "2.2.4",
"jquery-color": "1.0.0",
"jquery-jcrop": "0.9.13",
"jquery-knob": "1.2.11",
"jquery-ui": "1.12.1",
"jquery-ui-npm": "1.12.0",
"jquery-validation": "1.16.0",
"jquery.maskedinput": "1.4.1",
"lodash": "4.17.4",
"markdown": "0.5.0",
"morris.js": "0.5.0",
"nouislider": "10.0.0",
"prop-types": "15.5.10",
"raphael": "2.2.7",
"react": "15.5.4",
"react-bootstrap": "0.31.0",
"react-dom": "15.5.4",
"react-google-maps": "5.1.1",
"react-hot-loader": "3.0.0-beta.6",
"react-redux": "5.0.5",
"react-router": "3.0.5",
"react-router-redux": "4.0.8",
"react-tap-event-plugin": "2.0.1",
"redux": "3.6.0",
"redux-thunk": "2.2.0",
"reflux": "6.4.1",
"scriptjs": "2.5.8",
"select2": "4.0.3",
"smartadmin-plugins": "1.0.20",
"summernote": "0.8.4",
"then-request": "2.2.0",
"to-markdown": "3.0.4"
},
"devDependencies": {
"babel-core": "6.25.0",
"babel-loader": "7.0.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"clean-webpack-plugin": "0.1.16",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.28.4",
"file-loader": "0.11.2",
"html-loader": "0.4.5",
"html-webpack-plugin": "2.28.0",
"imports-loader": "0.7.1",
"json-loader": "0.5.4",
"redux-devtools": "3.4.0",
"redux-devtools-dock-monitor": "1.1.2",
"redux-devtools-log-monitor": "1.3.0",
"redux-logger": "3.0.6",
"script-loader": "0.7.0",
"style-loader": "0.18.2",
"url-loader": "0.5.9",
"webpack": "2.6.1",
"webpack-dev-server": "2.4.5"
}
}
I have tried to install bootstrap-duallistbox individually with npm or bower but nothing worked out well.
I'm trying to launch the react version of smartAdmin.
I try the bower install and npm install for you.
bower install --save bootstrap-duallistbox
Here is the result.
bower bootstrap-duallistbox#* cached https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox.git#4.0.1
bower bootstrap-duallistbox#* validate 4.0.1 against https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox.git#*
with npm: I add this in package.json and it works out.
"devDependencies": {
"bootstrap-duallistbox": "^3.0.6"
}
I am starting to use Ionic2 on a new project and all worked well to get it to install for the first time.
I have now setup a continuous integration build for it and when I am running npm install on the build server it fails with the following:
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! Invalid name: "#angular/http"
ionic info output:
Your system information:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.2.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Framework Version: 2.0.0-beta.8
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
OS: Windows 8
Node Version: v6.2.1
My package.json looks like this:
{
"dependencies": {
"#angular/common": "^2.0.0-rc.1",
"#angular/compiler": "^2.0.0-rc.1",
"#angular/core": "^2.0.0-rc.1",
"#angular/http": "^2.0.0-rc.1",
"#angular/platform-browser": "^2.0.0-rc.1",
"#angular/platform-browser-dynamic": "^2.0.0-rc.1",
"#angular/router": "^2.0.0-rc.1",
"es6-shim": "^0.35.0",
"ionic-angular": "2.0.0-beta.8",
"ionic-native": "1.2.4",
"ionicons": "3.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12"
},
"devDependencies": {
"browserify-istanbul": "^2.0.0",
"codecov.io": "^0.1.6",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-tslint": "^5.0.0",
"gulp-typescript": "^2.13.6",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "^1.1.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"isparta": "^4.0.0",
"jasmine-core": "^2.4.1",
"jasmine-spec-reporter": "^2.5.0",
"karma": "^0.13.22",
"karma-browserify": "^5.0.5",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.0.4",
"karma-phantomjs-launcher": "^1.0.0",
"phantomjs-prebuilt": "^2.1.7",
"protractor": "^3.3.0",
"run-sequence": "^1.1.5",
"traceur": "0.0.111",
"ts-node": "^0.9.1",
"tsify": "^0.16.0",
"tslint": "^3.11.0"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"name": "appname",
"description": "appname: An Ionic project",
"scripts": {
"karma": "gulp --gulpfile test/gulpfile.ts --cwd ./ karma-debug",
"postinstall": "typings install && cp test/karma-static/*.html node_modules/karma/static",
"test": "gulp --gulpfile test/gulpfile.ts --cwd ./ unit-test",
"e2e": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-e2e && protractor test/protractor.conf.js",
"start": "ionic serve",
"webdriver-update": "webdriver-manager update"
}
}
Updating the Node.js solved the problem in my case.
I'm getting following warnings while running npm commands, how to update these dependencies ?
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated npmconf#2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
My package.json -
{
"name": "lib",
"version": "0.0.0",
"author": {
"name": "user",
"email": "user#gmail.com"
},
"dependencies": {
"gulp-install": "^0.6.0",
"lodash": "^4.5.1"
},
"devDependencies": {
"chai": "^1.9.1",
"chai-jquery": "^1.2.3",
"karma-mocha-reporter": "^0.3.1",
"gulp": "^3.8.7",
"gulp-concat": "^2.3.4",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^0.3.1",
"karma": "^0.12.22",
"karma-chai": "^0.1.0",
"karma-chai-jquery": "^1.0.0",
"karma-chrome-launcher": "^0.1.4",
"gulp-ng-annotate": "^0.3.3",
"karma-jasmine": "^0.1.5",
"karma-jquery": "^0.1.0",
"karma-mocha": "^0.1.8",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sinon-chai": "^0.2.0",
"mocha": "^1.21.4",
"sinon": "^1.10.3",
"sinon-chai": "^2.5.0"
},
"engines": {
"node": ">=0.8.0"
}
}
You have packages, which are using old versions of these plugins.
You won't get rid of these warnings, till the developers of the packages upgrading their plugins (with the dependencies).
You can print all versions with all dependencies to find the targets:
bower list --depth=2
npm list --depth=2
Increase the depth if you don't find them.
I have an AngularJS app that works perfectly in localhost:3000 when I run gulp serve. I am trying to push it to Heroku and I get these errors. As seen in other posts, I have node_modules/ in my .gitignore, but the error is still there, even after running npm cache clear and npm install. If I run bower install --config.interactive=false I get a blank output.
-----> LOG FILE
PACKAGE.JSON
{
"name": "mymodule",
"version": "0.0.5",
"dependencies": {
"express": "^4.13.3",
"bower": "1.6.5",
"gulp-connect": "~2.0.6",
"gzippo": "^0.2.0"
},
"scripts": {
"test": "gulp test",
"start": "node node_modules/gulp/bin/gulp serveprod",
"postinstall": "./node_modules/bower/bin/bower install --config.interactive=false"
},
"devDependencies": {
"gulp": "~3.9.0",
"gulp-autoprefixer": "~2.3.1",
"gulp-angular-templatecache": "~1.6.0",
"del": "~1.2.0",
"lodash": "~3.9.3",
"gulp-csso": "~1.0.0",
"gulp-filter": "~2.0.2",
"gulp-flatten": "~0.0.4",
"gulp-jshint": "~1.11.0",
"gulp-load-plugins": "~0.10.0",
"gulp-size": "~1.2.1",
"gulp-uglify": "~1.2.0",
"gulp-useref": "~1.2.0",
"gulp-util": "~3.0.5",
"gulp-ng-annotate": "~1.0.0",
"gulp-replace": "~0.5.3",
"gulp-rename": "~1.2.2",
"gulp-rev": "~5.0.0",
"gulp-rev-replace": "~0.4.2",
"gulp-minify-html": "~1.0.3",
"gulp-inject": "~1.3.1",
"gulp-protractor": "~1.0.0",
"gulp-sourcemaps": "~1.5.2",
"gulp-sass": "~2.0.1",
"gulp-angular-filesort": "~1.1.1",
"main-bower-files": "~2.8.0",
"merge-stream": "~0.1.7",
"jshint-stylish": "~2.0.0",
"wiredep": "~2.2.2",
"karma": "~0.12.36",
"karma-jasmine": "~0.3.5",
"karma-phantomjs-launcher": "~0.2.0",
"karma-angular-filesort": "~0.1.0",
"karma-ng-html2js-preprocessor": "~0.1.2",
"concat-stream": "~1.5.0",
"require-dir": "~0.3.0",
"browser-sync": "~2.7.12",
"browser-sync-spa": "~1.0.2",
"http-proxy-middleware": "~0.0.5",
"chalk": "~1.0.0",
"uglify-save-license": "~0.4.1",
"wrench": "~1.5.8"
},
"engines": {
"node": ">=0.10.0"
}
}
You may be running into this open npm issue:
https://github.com/npm/npm/issues/9633
The bug only occurs when node_modules is present, so you can workaround by disabling caching of that directory:
$ heroku config:set NODE_MODULES_CACHE=false