Can not find module errors

So I am copying this code, (with credit ofc) and am getting errors.


module.exports = class QRCodeGenerate extends Command {
  constructor (client) {
    super({
      name: 'generate',
      aliases: ['create', 'g'],
      parent: 'qrcode',
      parameters: [{
        type: 'string', full: true, missingError: 'commands:qrcode.subcommands.generate.noText'
      }]



}, client)
  }`

  async run ({ t, author, channel, language }, text) {
    channel.send(
      new SwitchbladeEmbed(author)
        .setImage(`https://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(text)}`)
 )
  }
}```


Errors:

`    throw err;
    ^
Error: Cannot find module '../../../'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/commands/generate.js:2:39)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)`

I'm guessing I have to add in ../../../ but I don't know how.

Can you round your code in code blocks?

changed the title to be more relevant

1 Like

I’ll try.

20chars20chars

This is not an external module though, he’s attempting to find a module backwards in the path.

that will exit 3 directories

I got that, just idk how to input.

@ihack2712 Tried, doesn’t format.

```javascript
// Code here
```

Turns into:

// Code here

Oh thanks, I was doing `

Done. @ihack2712

20chars20chars’

Bump cause still have errors.

Another bump :slight_smile:
20chars