Next.js Discord

Discord Forum

ts-node tries to execute `.scss` file

Answered
tyeongkim posted this in #help-forum
Open in Discord
NextJS with Express Custome Server

Terminal :
/home/user/project/styles/globals.module.scss:1
.dropdown {
^

SyntaxError: Unexpected token '.'
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1288:20)
    at Module._compile (node:internal/modules/cjs/loader:1340:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .js] (/home/user/project/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/home/user/project/components/globals.tsx:26:65)
ts-node --project tsconfig.server.json -r tsconfig-paths/register server/index.ts exited with code 1


Packages :
next 13.2.3
ts-node 10.9.1
typescript 4.9.5
@swc/core 1.3.100
sass 1.58.3
express 4.18.2
Answered by tyeongkim
- Rename globals.module.scss and check Require Stack
View full answer

3 Replies

# Solved
- Rename globals.module.scss and check Require Stack
Answer
- Follow it and scroll to top to check import statement