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

ts-node 8.0.3 breaks just downgrade to 8.0.2 #95

Closed
Lavhe opened this issue May 16, 2019 · 4 comments
Closed

ts-node 8.0.3 breaks just downgrade to 8.0.2 #95

Lavhe opened this issue May 16, 2019 · 4 comments

Comments

@Lavhe
Copy link

Lavhe commented May 16, 2019

Short Description:

  • ts-node 8.0.3 breaks with TypeError: Unable to require .d.ts file

Workaround
downgrade to 8.0.2
...

@Lavhe Lavhe changed the title ts-node 8.0.3 breaks with TypeError: Unable to require .d.ts file ts-node 8.0.3 breaks just downgrade to 8.0.2 May 16, 2019
@ngduc
Copy link
Owner

ngduc commented May 16, 2019

Thanks for reporting @Lavhe
I've just pinned ts-node to 8.0.2 for now, I'll investigate more and update here.

@AlexSegen
Copy link

Hello, still can't compile this project. Installed ts-node 8.0.2 but it doesn't work.

D:\Repos\_EXPRESS\node-rem\node_modules\ts-node\src\index.ts:228
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: Ô¿» Unable to compile TypeScript:
src/api/routes/v1/index.ts(3,25): error TS2307: Cannot find module 'api/utils/Utils'.

    at createTSError (D:\Repos\_EXPRESS\node-rem\node_modules\ts-node\src\index.ts:228:12)

@ayimdomnic
Copy link

@AlexSegen Seems like the symlinks script isn't working.. just load the file api\utils\Util.ts normally

this way for example:

   export {};
import * as express from 'express';
import { apiJson } from "../../utils/Utils";

const supplierRoutes = require('./supplier.route');
const userRoutes = require('./user.route');
const authRoutes = require('./auth.route');
const uploadRoutes = require('./upload.route');
const router = express.Router();

/**
 * GET v1/status
 */
router.get('/status', (req, res, next) => {
    apiJson({ req, res, data: { status: 'OK' } });
    return next();
});

@ngduc
Copy link
Owner

ngduc commented Nov 8, 2020

ts-node is upgraded now to 9.0.0
I also refactored import paths so symlinks are not needed anymore to simplify build processes, etc.

@ngduc ngduc closed this as completed Feb 4, 2021
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

4 participants