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

ReferenceError: exports is not defined #94

Closed
gitmalong opened this issue May 3, 2021 · 1 comment · Fixed by #95
Closed

ReferenceError: exports is not defined #94

gitmalong opened this issue May 3, 2021 · 1 comment · Fixed by #95
Assignees
Labels
🐞 Bug Something isn't working

Comments

@gitmalong
Copy link

gitmalong commented May 3, 2021

default template
node v15.11.0

Info: === tsc-alias starting ===
Info: 11 files were affected!
file:///Users/user/Desktop/Code/butter/dist/server.js:2
Object.defineProperty(exports, "__esModule", { value: true });
^

ReferenceError: exports is not defined
at file:///Users/user/Desktop/Code/butter/dist/server.js:2:23
at ModuleJob.run (node:internal/modules/esm/module_job:154:23)
at async Loader.import (node:internal/modules/esm/loader:166:24)

tsconfig.json
{ "compileOnSave": false, "compilerOptions": { "target": "es2017", "lib": ["es2017", "esnext.asynciterable"], "typeRoots": ["node_modules/@types"], "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "forceConsistentCasingInFileNames": true, "moduleResolution": "node", "module": "commonjs", "pretty": true, "sourceMap": true, "declaration": true, "outDir": "./dist", "skipLibCheck": true, "allowJs": true, "noEmit": false, "esModuleInterop": true, "resolveJsonModule": true, "importHelpers": true, "baseUrl": "src", "paths": { "@app": ["app"], "@controllers/*": ["controllers/*"], "@dtos/*": ["dtos/*"], "@exceptions/*": ["exceptions/*"], "@interfaces/*": ["interfaces/*"], "@middlewares/*": ["middlewares/*"], "@models/*": ["models/*"], "@routes/*": ["routes/*"], "@services/*": ["services/*"], "@utils/*": ["utils/*"] } }, "include": ["src/**/*.ts", "src/**/*.json", ".env"], "exclude": ["node_modules"] }

@gitmalong gitmalong added the 🐞 Bug Something isn't working label May 3, 2021
@ljlm0402
Copy link
Owner

ljlm0402 commented May 4, 2021

@gitmalong

Thank you for leaving the bug issue.
We will deal with the same issue together. #89

ljlm0402 added a commit that referenced this issue May 4, 2021
- Starting the app throws an error (Ubuntu) #89
- Cannot find module './' #91
- ReferenceError: exports is not defined #94
@ljlm0402 ljlm0402 linked a pull request May 4, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants