43081j / id3

A JavaScript ID3 tags parser for Node & browsers.
MIT License
335 stars 63 forks source link

Nodered in Docker run issue #49

Open TDenisM opened 4 years ago

TDenisM commented 4 years ago

I need id3js in Nodered inside Docker container. I installed id3 running npm i -S id3js in /data directory. According to Nodered manual (https://nodered.org/docs/user-guide/writing-functions#loading-additional-modules) I have added id3js:require('id3js') to functionGlobalContext section. After container retsart I have this on logs:

> node-red-docker@1.0.3 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

Error loading settings file: /data/settings.js
/data/node_modules/id3js/lib/id3.js:1
import { parse } from './id3Tag.js';
       ^

SyntaxError: Unexpected token {
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/data/settings.js:220:8)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)