Skip to content

Using Annotorius for openseadragon with Webpack under Symfony #568

@drisssadoun

Description

@drisssadoun

Hello,

I'm trying to install Annotorious to use it with openseadragon under a Symfony 7 project that uses webpack encore.

Annotorious version

  • used package @annotorious/annotorious and @annotorious/openseadragon
  • version number : @annotorious/openseadragon@3.6.12
  • Symfony 7
  • npm version 6.14.18
  • node version : 14.21.3

Issue behavior

I've installed both @annotorious/annotorious and @annotorious/openseadragon using these commands :

npm install @annotorious/annotorious

npm install openseadragon @annotorious/openseadragon

Then, we I try to build the project using : "npm run build" the below error is raised. I noticed that js files of the module annotorius are all compiled (from .ts files). I guess it may be the origin of the error ? I've installed ts-loader but it didn't solve the problem. Does anyone has an idea how I could solve the error ?

error in ./node_modules/@annotorious/openseadragon/dist/annotorious-openseadragon.es.js

Module parse failed: Unexpected token (49:22)
You may need an appropriate loader to handle this file type.
| return Hh.randomUUID();
| r = r || {};
| const n = r.random ?? ((i = r.rng) == null ? void 0 : i.call(r)) ?? sg();
| if (n.length < 16)
| throw new Error("Random bytes length must be >= 16");

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions