SyntaxError: Cannot Use Import Statment Without A Module, TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Catch 22
I have been having issues with node js. Here is the relevant code (app.ts): const express = require('express'); const auth = require('./service/auth'); import { Request, Response
Solution 1:
const { Request, Response } = require("express")
Same thing for the other ones.
Post a Comment for "SyntaxError: Cannot Use Import Statment Without A Module, TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Catch 22"