Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import Essentia #128

Open
8 tasks
bclark288 opened this issue Aug 8, 2023 · 0 comments
Open
8 tasks

Can't import Essentia #128

bclark288 opened this issue Aug 8, 2023 · 0 comments

Comments

@bclark288
Copy link

What is the issue about?

  • [ X] Bug
  • Feature request
  • Usage question
  • Documentation
  • Contributing / Development

What part(s) of Essentia.js is involved?

  • essentia.js-core (vanilla algorithms)
  • essentia.js-model (machine learning algorithms)
  • essentia.js-plot (plotting utility module)
  • essentia.js-extractor (typical algorithm combinations utility)

Description

I'm trying to use Essentia-WASM in a node / nestjs project. I've gotten everything to work ok using require('essentia.js'), but I would like to use the import statements demontrated in the "Getting started" Tutorial.
import Essentia from './essentia.js-core.es.js';
// import essentia-wasm-module
import { EssentiaWASM } from './essentia-wasm.es.js';

However, when I use these I get the following error:
/audio-analysis/node_modules/essentia.js/dist/essentia-wasm.es.js:32
export { Module as EssentiaWASM };
^^^^^^

SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1197:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:119:18)
at Object. (/audio-analysis/src/app.controller.ts:6:1)
at Module._compile (node:internal/modules/cjs/loader:1233:14)

...

Steps to reproduce / Code snippets / Screenshots

System info

i.e. Hardware, OS, platform (which browser / version of Node, etc), Essentia.js version...
Essentia.js version 0.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant