Please Help me out I am new to everything regarding heroku and bower assume I understand very Little Here is the heroku log.
Everything with this was working until yesterday and all of a sudden minor changes won't deploy properly
bower moment#>= 2.6.0 resolved git://github.com/moment/moment.git#2.10.6
bower angular resolution Unsuitable resolution declared for angular: 1.4.4
bower ECONFLICT Unable to find suitable version for angular
npm ERR! Linux 3.13.0-57-generic
npm ERR! argv "/tmp/build_1c565364c27a4cdb7538ade6aae8f158//node-v0.12.4-linux-x64/bin/node" "/tmp/build_1c565364c27a4cdb7538ade6aae8f158/node-v0.12.4-linux-x64/bin/npm" "install"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! fronted#1.0.0 postinstall: `./node_modules/bower/bin/bower install;`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fronted#1.0.0 postinstall script './node_modules/bower/bin/bower install;'.
npm ERR! This is most likely a problem with the fronted package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./node_modules/bower/bin/bower install;
npm ERR! You can get their info via:
npm ERR! npm owner ls fronted
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
! Push rejected, failed to compile nginx-buildpack app
Here is the bower.json
{
"name": "ac",
"version": "0.0.0",
"dependencies": {
"angular": "~1.4.0",
"bootstrap": "~3.3.5",
"angular-resource": "~1.4.0",
"angular-ui-router": "~0.2.15",
"angular-bootstrap": "~0.13.0",
"spin": "~1.1.6",
"angular-spinner": "~0.6.2",
"moment-timezone": "~0.4.0",
"angular-ui-select": "~0.12.0",
"angular-sanitize": "~1.4.2",
"intl-tel-input": "~6.0.4",
"international-phone-number": "~0.0.8",
"angular-cookies": "~1.4.3",
"angular-ui-notification": "~0.0.11",
"angular-loading-bar": "~0.8.0",
"angular-sweetalert": "~1.1.0"
},
"resolutions": {
"angular": "~1.4.0"
},
"devDependencies": {
"angular-mocks": "~1.4.0"
},
"appPath": "app",
"moduleName": "frontApp",
"resolutions": {
"intl-tel-input": "~6.0.4",
"angular": "1.4.4"
}
}
I had this same issue after installing moment via bower
Adding resolutions to your bower.json seems to solve it.
Example
//dependencies
},
"resolutions": {
"angular": "1.5.0",
"moment": "2.12.0"
}
Related
I created a fresh Laravel project. And to use Vue JS I tried installing this package,
#vitejs/plugin-vue
But this throws me a set of errors,
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #vitejs/plugin-vue#3.0.0
npm ERR! Found: vite#2.9.14
npm ERR! node_modules/vite
npm ERR! dev vite#"^2.9.11" from the root project
npm ERR! peer vite#"^2.9.9" from laravel-vite-plugin#0.4.0
npm ERR! node_modules/laravel-vite-plugin
npm ERR! dev laravel-vite-plugin#"^0.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite#"^3.0.0" from #vitejs/plugin-vue#3.0.0
npm ERR! node_modules/#vitejs/plugin-vue
npm ERR! #vitejs/plugin-vue#"^3.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite#3.0.0
npm ERR! node_modules/vite
npm ERR! peer vite#"^3.0.0" from #vitejs/plugin-vue#3.0.0
npm ERR! node_modules/#vitejs/plugin-vue
npm ERR! #vitejs/plugin-vue#"^3.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
I followed these steps,
1.laravel new {proj_name}.
2. npm install vue#next.
3. npm install.
4. After that I created a vue file and imported into app.js (resources/js/app.js).
5. I went to the blade file and cleared all -> hit `!` for emmet snippet, created a div with id #app, and add
#vite('resources/js/app.js').
I throw an error saying install #vitejs/plugin-vue. But when I try to install that it throws me those errors.
npm install vue#next vue-loader#next
npm i #vitejs/plugin-vue#2.3.3
composer require innocenzi/laravel-vite:0.2.*
npm i -D vite vite-plugin-laravel
vite.config.js
import { defineConfig } from 'vite'
import vue from '#vitejs/plugin-vue'
import laravel from 'vite-plugin-laravel'
export default defineConfig({
plugins: [
vue(),
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
],
refresh: true,
})
]
})
maybe you need to change app.js
import {createApp} from 'vue/dist/vue.esm-bundler.js';
or for async component add defineAsyncComponent
import {createApp, defineAsyncComponent} from 'vue/dist/vue.esm-bundler.js';
#vite() leave blank
If someone else is facing this issue add it directly to your package.json and then run npm i:
"#vitejs/plugin-vue": "^3.0.1"
I'm running the follow command to push my app on Heroku 'git push heroku master', but it returns:
-----> Installing binaries
engines.node (package.json): 16.13.2
engines.npm (package.json): 8.1.2
Resolving node version 16.13.2...
Downloading and installing node 16.13.2...
npm 8.1.2 already installed with node
-----> Installing dependencies
Installing node modules (package.json)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: paper-kit-2-angular#1.4.0
npm ERR! Found: zone.js#0.11.3
npm ERR! node_modules/zone.js
npm ERR! zone.js#"0.11.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js#"~0.10.3" from #angular/core#11.0.4
npm ERR! node_modules/#angular/core
npm ERR! #angular/core#"11.0.4" from the root project
npm ERR! peer #angular/core#"11.0.4" from #angular/common#11.0.4
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"11.0.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /tmp/npmcache.GEG9a/eresolve-report.txt for a full report.
Can anyone help me?
Add your local "node" and "npm" version to package.json. For example I did:
"engines": {
"node": "16.15.1",
"npm": "8.5.5"
},
Apparently for me the "knex" module that I use is not compatible with newer npm (I am not sure).
I have a discord.js bot and it runs on Heroku.
I added canvas just now, and now the bot is failing to build.
This is the log:
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> canvas#2.6.1 install /tmp/build_c8ad4f45_/node_modules/canvas
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! canvas#2.6.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the canvas#2.6.1 install 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! /tmp/npmcache.uZg6i/_logs/2021-01-01T17_53_37_239Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- node_modules checked into source control
https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I already installed node-pre-gyp as the log suggested, and nothing changed.
Here is package.json:
{
"dependencies": {
"canvas": "^2.6.1",
"discord.js": "^12.4.1",
"dotenv": "^8.2.0",
"firebase": "^8.1.1",
"firebase-admin": "^9.4.1",
"node-pre-gyp": "^0.11.0"
}
}
Does anyone know a solution to this?
I used create-react-app to generate an app.
create-react-app myapp
When I run yarn start or npm start I get this error:
react-scripts start
sh: react-scripts: command not found npm ERR! file sh npm ERR! code
ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR!
myapp#0.1.0 start: react-scripts start npm ERR! spawn ENOENT npm
ERR! npm ERR! Failed at the myapp#0.1.0 start script. npm ERR! This
is probably not a problem with npm. There is likely additional logging
output above.
When I run npm ls react:
myapp#0.1.0 /Users/johnno/foosball
└── react#16.2.0
react-scripts is present.
This is my package.json:
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-scripts": "1.0.17",
"redux": "^3.7.2",
"yarn": "^1.3.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
I tried the suggestions from this but to no avail. How can I fix this issue?
i solved this by deleting
node_modules
yarn.lock
manifest_lock.json
and installed packages by
npm install
or
yarn
Following steps worked for me
delete node_modules folder
delete yarn.lock if you are using yarn command or delete package-lock.json if you are using npm command
run yarn install (for yarn command) or npm install (for npm command)
after upgrade ionic2 in the new project (from scratch) ..
cannot use socket.io.
import * as io from 'socket.io-client';
...
this.socket = io(url);
....
build failed: bundle prod failed: Cannot call a namespace ('io')
in previous version it was solved by:
typings install dt~socket.io-client --save --global
The error print and configurations below:
[12:19:27] bundle prod failed: Cannot call a namespace ('io')
[12:19:27] Error: Cannot call a namespace ('io')
at error (/*****************/node_modules/rollup/dist/rollup.js:5404:12)
at CallExpression.bind (/*****************/node_modules/rollup/dist/rollup.js:5837:5)
at /*****************/node_modules/rollup/dist/rollup.js:5149:50
at AssignmentExpression.eachChild (/*****************/node_modules/rollup/dist/rollup.js:5166:5)
at AssignmentExpression.bind (/*****************/node_modules/rollup/dist/rollup.js:5149:7)
at AssignmentExpression.bind (/*****************/node_modules/rollup/dist/rollup.js:5509:23)
at /*****************/node_modules/rollup/dist/rollup.js:5149:50
at ExpressionStatement.eachChild (/*****************/node_modules/rollup/dist/rollup.js:5166:5)
at ExpressionStatement.bind (/*****************/node_modules/rollup/dist/rollup.js:5149:7)
at BlockStatement.bind (/*****************/node_modules/rollup/dist/rollup.js:5615:9)
Error running ionic app script "build": Error: Cannot call a namespace ('io')
npm ERR! Linux 4.4.0-38-generic
npm ERR! argv "/.nvm/versions/node/v6.7.0/bin/node" "/.nvm/versions/node/v6.7.0/lib/node_modules/npm/bin/npm-cli.js" "run-script" "build"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world# build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world# build script 'ionic-app-scripts 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 ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
....
package.json
{
...
"dependencies": {
"#ionic/storage": "^1.0.3",
"ionic-angular": "^2.0.0-rc.0",
"ionic-native": "^2.0.3",
"ionicons": "^3.0.0",
"socket.io-client": "^1.5.0"
},
"devDependencies": {
"#ionic/app-scripts": "latest",
"typescript": "^2.0.3"
},
...
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": []
}
typings.json
{
"globalDependencies": {
"socket.io-client": "registry:dt/socket.io-client#1.4.4+20160317120654"
}
}
System Info
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0-beta.3
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS
Node Version: v6.7.0
The syntax
import io from 'socket.io-client'
..is not standard, you will have runtime errors:
Keep the syntax import * as io from 'socket.io-client', then in Typescript cast io as any to call the default method:
var ioFunc = (io as any).default ? (io as any).default : io;
this.socket = ioFunc(url);
The solution: no wildcard import...
import io from 'socket.io-client';
instead
import * as io from 'socket.io-client'