Heroku Error? Saying that my package.json is missing things - heroku

When using Heroku, I get this error message in Terminal:
(node:59291) Error Plugin: heroku: could not find package.json with {
type: 'core',
root: '/usr/local/lib/node_modules/heroku',
name: '#heroku-cli/plugin-buildpacks'
}
module: #oclif/config#1.13.2
task: loadPlugins
plugin: heroku
root: /usr/local/lib/node_modules/heroku
See more details with DEBUG=*
Not sure where to start to fix this.
I tried installing Heroku via NPM when I already had the CLI installed, not sure if that's the cause...

I had Heroku installed both via brew and npm i heroku -g the -g made it global which was installed in the location mentioned in the error. I uninstalled the npm version and it's back to normal. npm uninstall heroku -g

Related

Heroku Login: login is not a heroku command

I have tried
$ npm install -g heroku
$ npm install -g heroku-cli
and I have also tried downloading Heroku-CLI from the heroku site and when I attempt to run
heroku login
It comes back with
Warning: login is not a heroku command. Did you mean join? [y/n]:
I can't figure out what is going on. I have my environmental variables set up and everything.
Try uninstalling heroku cli by npm -g uninstall heroku cli and then run heroku login
For more refer to this: https://github.com/heroku/cli/issues/855

How do I install Heroku CLI on Termux?

Termux is a Linux terminal emulator for Android. I want to install the Heroku CLI to be able to manage my Heroku apps on the go, I tried typing heroku to prompt the error message and link to the right package, but it gives me:
No command 'heroku' found, did you mean:
Command 'heyu' from package 'heyu'
I tried installing the CLI from the official website, but that didn't work out as well. What should I do?
Use the npm package heroku, its the complete CLI as what you find from the official website. Simply do
npm i -g heroku
Alternatively, you may use yarn. Install yarn by doing
pkg install yarn
and then install the Heroku CLI by
yarn add global heroku-cli#latest

Module version mismatch composer-connector-hlfv1

I keep getting a "module version mismatch" error when walking through the developer guide tutorial. I'm able to complete almost all of the tutorial (creating and testing my business network, deploying it to local fabric, interacting with it via the rest server), but get an error when running yeoman to create the sample angular app...
~/git/my-test-network$ yo hyperledger-composer:angular
Welcome to the Hyperledger Composer Angular project generator
? Do you want to connect to a running Business Network? Yes
? Project name: my-app
? Description: Commodity
? Author name: t
? Author email: t
? License: Apache-2.0
? Business network identifier: my-test-network
? Connection profile: hlfv1
? Enrollment ID: admin
? Enrollment secret: adminpw
? Do you want to generate a new REST API or connect to an existing REST API? Generate a new REST API
? REST server port: 4000
? Should namespaces be used in the generated REST API? Never use namespaces
events.js:160
throw er; // Unhandled 'error' event
^
Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "hlfv1". Error: Module version mismatch. Expected 48, got 46.
at connectionProfileStore.load.then.e (/usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/composer-common/lib/connectionprofilemanager.js:150:38)
I believe this is related to npm, but I have uninstalled/reinstalled/rebuild several times and the error persists
npm uninstall -g composer-cli
npm uninstall -g composer-rest-server
npm uninstall -g generator-fabric-composer
npm install -g composer-cli
npm install -g composer-rest-server
npm install -g generator-fabric-composer
npm uninstall -g yo
npm install -g yo
my setup ...
Ubuntu 16.04.1 LTS
docker --version Docker version 17.06.0-ce, build 02c1d87
docker-compose --version docker-compose version 1.8.0, build unknown
node --version v6.11.1
npm --version 5.3.0
npm -v composer-cli 5.3.0
npm -v composer-rest-server 5.3.0
npm -v generator-hyperledger-composer 5.3.0
npm -v yo 5.3.0
Please check the output from composer -v
You should be using generator-hyperledger-composer Above I see you installed the old version: npm install -g generator-fabric-composer
Can you please cd into the generated app and rm -r the node_modules directory, and then rerun npm install.

Npm install fails on heroku: error phantomjs#1.9.7-5 install: `node install.js

npm install works when run on my local machine and on codeship.io, but fails on heroku.
This seems to be an issue with the phantom npm package. It has happened on two separate projects simultaneously. Both works locally, on codeship and on my deployment server, but wont run on heroku.
Founder of Codeship here.
Have you tried setting the phantom npm package as a development dependency so it doesn't get installed on Heroku?

Command error running installed npm modules

Hi guys could you help me? i've installed the latest version of node.js and installed cordova and ionic framework the problem starts is when i'm trying to run the ionic command, the console throw me the following message:
MacBook-Pro-de-Diego:~ diegochavez$ ionic start myApp
-bash: ionic: command not found
So then i looked for the root of my npm modules
MacBook-Pro-de-Diego:~ diegochavez$ npm root
/Users/diegochavez/node_modules
if you guys know something to fix this? Thanks in advance
First check if ionic is installed at path like /usr/local/lib/node_modules/ionic/bin/ionic. If it is there, you need to check the npm default global path.
Run command npm config get prefix to check the default path, it should be /usr/local. If it is not /usr/local, run command npm config set prefix /usr/local to set it. And then install again. Also see this answer
I having issue while running - sudo npm install -g gulp ionic with below version of node installed
node -v v0.10.15
npm -v 1.3.5
Error went way after I update node to latest version v0.10.26
The error you are getting is because ionic was not installed successfully. Trying updating node and run command as mentioned sudo npm install -g gulp ionic
Check where your npm folder is located. If your npm folder is located in $Home..then type this:
export PATH="$HOME/npm/bin:$PATH"
You need to run sudo npm install -g ionic from the command line.

Resources