Skip to content

SyntaxError, "Cannot use import statement outside a module" #1322

@Fossy777

Description

@Fossy777

Hi Disane, everybody,

just today tried to bring up this latest (v2.0.7) as a container on my Synology DS923+ (AMD Ryzen, X64) with absolute minimum parameters but it still fails. As I have no CLI, I use Portainer and Stacks (compose) to deploy (but works like a charm with everything up to now).

Here is how my stack looks like:

version: "3.9"
services:
  docudigger:
    image: ghcr.io/disane87/docudigger
    container_name: Docudigger
    hostname: docudigger
    security_opt:
      - no-new-privileges:true
    user: 1026:100
    environment:
      - TZ=Europe/Berlin
      - AMAZON_USERNAME='<myemail>' \
      - AMAZON_PASSWORD='<mypass>' \
      - AMAZON_TLD='de' \
      - AMAZON_YEAR_FILTER='2025' \
      #- AMAZON_PAGE_FILTER='1' \
      - LOG_LEVEL='info' \
    volumes:
      - /volume1/docker/docudigger:/home/node/docudigger:rw
    restart: on-failure:5

And here are the logs:

[0] docudigger scrape all exited with code 1
[0] (node:15) Warning: SyntaxError
[0] module: @oclif/[email protected]
[0] task: findCommand (scrape:all.d)
[0] plugin: @disane-dev/docudigger
[0] root: /home/node/.npm-global/lib/node_modules/@disane-dev/docudigger
[0] message: Cannot use import statement outside a module
[0] See more details with DEBUG=*
[0] (Use `node --trace-warnings ...` to show where the warning was created)
[0] (node:15) Warning: SyntaxError
[0] module: @oclif/[email protected]
[0] task: findCommand (scrape:amazon:index.d)
[0] plugin: @disane-dev/docudigger
[0] root: /home/node/.npm-global/lib/node_modules/@disane-dev/docudigger
[0] message: Cannot use import statement outside a module
[0] See more details with DEBUG=*
[0] node:os:365
[0]     throw new ERR_SYSTEM_ERROR(ctx);
[0]           ^
[0] 
[0] SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
[0]     at userInfo (node:os:365:11)
[0]     at Config._shell (/home/node/.npm-global/lib/node_modules/@disane-dev/docudigger/node_modules/@oclif/core/lib/config/config.js:588:67)
[0]     at Config.load (/home/node/.npm-global/lib/node_modules/@disane-dev/docudigger/node_modules/@oclif/core/lib/config/config.js:310:27)
[0]     at async Config.load (/home/node/.npm-global/lib/node_modules/@disane-dev/docudigger/node_modules/@oclif/core/lib/config/config.js:168:9)
[0]     at async Object.run (/home/node/.npm-global/lib/node_modules/@disane-dev/docudigger/node_modules/@oclif/core/lib/main.js:62:20) {
[0]   code: 'ERR_SYSTEM_ERROR',
[0]   info: {
[0]     errno: -2,
[0]     code: 'ENOENT',
[0]     message: 'no such file or directory',
[0]     syscall: 'uv_os_get_passwd'
[0]   },
[0]   errno: [Getter/Setter],
[0]   syscall: [Getter/Setter]
[0] }
[0] 
[0] Node.js v20.18.0
[0] docudigger scrape all exited with code 1

Am I missing something or is there something wrong with the container/code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions