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

import-in-the-middle crashes the directus app #169

Closed
coignite-user opened this issue Dec 12, 2024 · 1 comment
Closed

import-in-the-middle crashes the directus app #169

coignite-user opened this issue Dec 12, 2024 · 1 comment

Comments

@coignite-user
Copy link

coignite-user commented Dec 12, 2024

Expected Behavior

Not to crash

Actual Behavior

file:///workspace/node_modules/node-machine-id/dist/index.js?iitm=true:23
       let $electron-machine-id = _.electron-machine-id
                    ^
 
SyntaxError: Unexpected token '-'
     at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:168:18)
     at callTranslator (node:internal/modules/esm/loader:279:14)
     at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:30)

Steps to Reproduce the Problem

start.js

import {config} from 'dotenv';
import {startServer} from '@directus/api/server';
config();
startServer();
  1. Setup directus
  2. npm install newrelic
  3. Run npx directus bootstrap && node --experimental-loader newrelic/esm-loader.mjs -r newrelic scripts/start.js
  4. Watch it crash

Specifications

  • Environment: Docker
  • Node: v21.7.3
  • OS: 4.4.0 x86_64 GNU/Linux
  • Directus: 11.3.2
  • newrelic: 12.8.2
  • import-in-the-middle: 1.11.3
  • node-machine-id: 1.1.12
@timfish
Copy link
Contributor

timfish commented Dec 12, 2024

This looks like a duplicate of #94

@timfish timfish closed this as completed Dec 13, 2024
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

2 participants