ts-macros icon indicating copy to clipboard operation
ts-macros copied to clipboard

[BUG] Warning: Accessing non-existent property 'tracing' of module exports inside circular dependency

Open tusharmath opened this issue 2 years ago • 2 comments

Describe the bug Node.js Warning about circular dependency. View the trace below —

(node:62719) Warning: Accessing non-existent property 'tracing' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:748:11)
    at Object.get (node:internal/modules/cjs/loader:764:5)
    at checkVariableDeclaration (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:83763:39)
    at checkSourceElementWorker (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:86977:28)
    at checkSourceElement (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:86808:17)
    at Object.forEach (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:377:30)
    at checkVariableStatement (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:83776:16)
    at checkSourceElementWorker (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:86946:28)
    at checkSourceElement (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:86808:17)
    at Object.forEach (/Users/tushar/Documents/Projects/ts-macro-schema/node_modules/typescript/lib/typescript.js:377:30)

Code to reproduce Simply run npx ttsc --watch

Expected behavior No warning should occur

Additional context package.json

{
  "devDependencies": {
    "jest": "^29.3.1",
    "ts-macros": "^2.0.0",
    "ttypescript": "^1.5.13",
    "typescript": "4.8.4"
  },
  "scripts": {
    "test": "jest",
    "build": "ttsc -b"
  },
  "license": "MIT"
}

tusharmath avatar Jan 13 '23 18:01 tusharmath

Does the transformer still work correctly after the warning?

GoogleFeud avatar Jan 14 '23 21:01 GoogleFeud

Yes. It works just fine. Weirdly I do get this issue in watch mode only. Otherwise I don't get this warning.

tusharmath avatar Jan 14 '23 21:01 tusharmath