After I modified the file in my self-defined packages, an error occured

Hi, guys!
I have a self-defined package in the meteor app, but after I modified some files in this package, an error occured:
the methods is existing!
How can I do now?

Hi, could you post your code and errors? I can’t help without it.

Exception in callback of async function: Error: Cannot add a route at an existing path:

Can you post the full stack trace and the code around the location of the error?
You’re not providing enough information for anyone to help

Ok, thanks first to megaman and coagmano!
The problem is very complex, and I am sure it’s not about the code.
I need time to clear up the whole thing. Thanks!

The problem it’s the .svn directory.
After I removed it, all errors disappeared.:sweat_smile:

Weird, Meteor is supposed to ignore folders starting with a .
Was this a .svn folder inside the package?
How were package files included in the package.js file?

Hi, @coagmano, I think it’s odd too, so let me tell you the whole story:

  1. I get the app source code from my subversion server by “svn co”, and use “svn update” to keep it fresh;
  2. the .svn folder is in the app root directory of course;
  3. I got the “(svn)conflict” problem many times but all resolved;
  4. This is my package’s core file:
    myteamJoin({ cid }) {
    if (!this.userId) {
    throw new Meteor.Error(‘error-invalid-user’, ‘Invalid user’, { method: ‘myteamJoin’ });
    (nimble:restivus)MYAPI.v1.addRoute(‘myteam.update/:id’, { authRequired: false }, {

  5. In previous times the app can be compiled and executed, but after I modified and “svn ci/update” the code many times, the error “method or route exists” ocurred and I’m sure there are no duplicate code snippet or files.
  6. So I decided to delete somethings like the .svn folder, I typed this command:
    find . -type d -name ".svn"|xargs rm -rf
    And like I told you before, all errors disappeared.:sweat:

I think this might be an actual meteor tool bug, if it’s potentially including files from the .svn directory.
I’d create an issue on the github:

I tried searching for the string "method or route exists" in meteor and restivus’ sources and couldn’t find it in either.
What packages are you using and which versions?

The exact error message is: “Cannot add a route at an existing path”
And the nimble:restivus version is: 0.8.12

Yeah okay, so it’s being thrown here:

I’m unsure if this makes sense for svn but I suspect an older version of the same file is being loaded from that folder, and making restivus upset that both files are trying to register the same path

Can you test somehow if files in the .svn folder are being loaded? Maybe just add an obvious console.log?

Hi, @coagmano.
restivus throwed ‘the route exists’,
and meteor(v1.8.0.2) throwed ‘the method exists’.
It looks like there are duplicated files in the .svn?
Let me do a test after my works be finished.:smile: