C3-prov issues - method undefined

#1

I’ve sometimes issues provisionning C3.
For example:

  1. add a method in Location.c3typ
  2. implement the method
  3. c3-prov
  4. c3ImportAll
  5. test the method : Location.myMethod => undefined

Solutions:

  1. very hack:
    a) adding a fake attribut to Location (test: string)
    b) c3-prov
    c) c3ImportAll
    d) test the method : Location.myMethod => ok
  2. annoying: new tag

I also tried c3-prov … -r but no effect.

Example code is:

------------------------- Location.c3typ ----------------------------------
remix type Location {
emrMake: function(id: string, postalCode: string): Location js server
}

------------------------- Location.js ----------------------------------
// static
function emrMake (id, postalCode) {
if (! /^\d{4}$/.test(postalCode)) throw new Error(‘postalCode be 4 digits’ + postalCode);
var locationSeed = {
address : {
components: [{
name: postalCode,
types: [{
id: ‘postal_code’
}]
},
{
name: ‘BE’,
abbr: ‘BE’,
types: [{
id: ‘country’
}]
}]
}
};
if (id) locationSeed.id = id;
return Location.make(locationSeed);
}

// Location.js

0 Likes

#2

Please avoid creating too many tags, and for -r check this thread When should you use the reset option when provisioning?

0 Likes

#3

Sorry if I create many tags, I do that because I’m blocked:
provisionning fails and
doing the same provisioning on a new tag sometimes succeed or at least, returns more meaningfull error messages.

0 Likes