highcharts / highcharts/node-export-server
ReferenceError: moment is not defined
- Lingua principale
- JavaScript
- Stelle
- 369
- Fork
- 266
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello,
I try to use node-export-server from docker with a formatter using moment.js :
datethe = moment().year(datetheYW[0]).isoWeek(datetheYW[1]).startOf('isoWeek').format('YYYY-MM-DD') + ' w' + datetheYW[1] + '';
but I got this error : ReferenceError: moment is not defined
/bin/docker run -u 0:0 --rm --tmpfs=/run highcharts_es cat lib/schemas/config.js
contains :
custom: [
'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.45/moment-timezone-with-data.min.js'
]
On the dockerfile :
ENV HIGHCHARTS_MOMENT="YES" (or true or 1)
I am not sure it is still valid because HIGHCHARTS_MOMENT does not appear on the documentation
+
npm install -S moment moment-timezone luxon (...)
I am not sure it is needed given lib/schemas/config.js
Could you help me to understand how to make it work please ?
The command line:
/usr/local/bin/highcharts-export-server --resources '[]' --allowFileResources true --allowCodeExecution true --infile "$from" --outfile "$to" $width $height $scale --logLevel 2 --nologo true 2>&1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia da lib/schemas/config.js e dalle impostazioni di Dockerfile menzionate nel report, quindi riproduci l’invocazione da riga di comando con le risorse personalizzate e le opzioni allowCodeExecution indicate. Determina perché moment non è disponibile per il formatter e verifica una configurazione che permetta al comando di completarsi senza il ReferenceError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100