mirror of https://github.com/embarklabs/embark.git
feature(@package/embarkjs): warn when a embarkjs plugin might be missing
This commit is contained in:
parent
8691716346
commit
7a3bf59c81
|
@ -78,6 +78,10 @@ Blockchain.setProvider = function(providerName, options) {
|
|||
let provider = this.Providers[providerName];
|
||||
|
||||
if (!provider) {
|
||||
if (providerName === 'web3') {
|
||||
console.log("the embarkjs-web3 package might be missing from your project dependencies");
|
||||
}
|
||||
|
||||
throw new Error([
|
||||
'Unknown blockchain provider. Make sure to register it first using',
|
||||
'EmbarkJS.Blockchain.registerProvider(providerName, providerObject)'
|
||||
|
|
|
@ -10,7 +10,10 @@ Messages.setProvider = function (providerName, options) {
|
|||
let provider = this.Providers[providerName];
|
||||
|
||||
if (!provider) {
|
||||
throw new Error('Unknown messages provider');
|
||||
if (providerName === 'whisper') {
|
||||
console.log("the embarkjs-whisper package might be missing from your project dependencies");
|
||||
}
|
||||
throw new Error('Unknown messages provider: ' + providerName);
|
||||
}
|
||||
|
||||
this.currentProviderName = providerName;
|
||||
|
|
|
@ -11,7 +11,10 @@ Names.setProvider = function(providerName, options) {
|
|||
let provider = this.Providers[providerName];
|
||||
|
||||
if (!provider) {
|
||||
throw new Error('Unknown name system provider');
|
||||
if (providerName === 'ens') {
|
||||
console.log("the embarkjs-ens package might be missing from your project dependencies");
|
||||
}
|
||||
throw new Error('Unknown name system provider: ' + providerName);
|
||||
}
|
||||
|
||||
this.currentProviderName = providerName;
|
||||
|
|
|
@ -56,7 +56,13 @@ Storage.setProvider = function (providerName, options) {
|
|||
let provider = this.Providers[providerName];
|
||||
|
||||
if (!provider) {
|
||||
throw new Error('Unknown storage provider');
|
||||
if (providerName === 'ipfs') {
|
||||
console.log("the embarkjs-ipfs package might be missing from your project dependencies");
|
||||
}
|
||||
if (providerName === 'swarm') {
|
||||
console.log("the embarkjs-swarm package might be missing from your project dependencies");
|
||||
}
|
||||
throw new Error('Unknown storage provider: ' + providerName);
|
||||
}
|
||||
|
||||
this.currentProviderName = providerName;
|
||||
|
|
Loading…
Reference in New Issue