endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.46k stars 728 forks source link

SyntaxError: Invalid or unexpected token #276

Closed zohar closed 4 years ago

zohar commented 4 years ago

Newbie here...

I ran composer require endroid/qr-code and then used the code from the Advanced Usage.

I then receive

/path/to/qrcode.js:1
use Endroid\QrCode\ErrorCorrectionLevel;
    ^^^^^^^^

SyntaxError: Invalid or unexpected token
    at wrapSafe (internal/modules/cjs/loader.js:1053:16)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
endroid commented 4 years ago

Hi @zohar sorry but this is a PHP library not a JS library.

zohar commented 4 years ago

doh... :-)