question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Versions 1.3.0 and 1.3.1 are not works for my project.

See original GitHub issue

Hi, Versions 1.3.0 and 1.3.1 are not works for my project, but version 1.2.11 is working fine.

I have this error on the last version. But when I run npx tsc-alias@1.2.11 it works without errors.

Info: === tsc-alias starting ===
/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/index.js:121
        const isAlias = requiredModule.includes('/')
                                       ^

TypeError: Cannot read property 'includes' of undefined
    at replaceImportStatement (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/index.js:121:40)
    at /home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/index.js:145:83
    at String.replace (<anonymous>)
    at ImportPathResolver.replaceSourceImportPaths (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/utils/ImportPathResolver.js:23:35)
    at Object.replaceSourceImportPaths (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/utils/ImportPathResolver.js:64:51)
    at replaceAlias (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/index.js:145:32)
    at Object.replaceTscAliasPaths (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/index.js:168:13)
    at Object.<anonymous> (/home/victor/GIT/Nanoheal.com/nh_deployment/packages/cloud-backend/node_modules/tsc-alias/dist/bin/index.js:16:5)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
error Command failed with exit code 1.

Thanks for your project!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mikeahirschcommented, Jun 7, 2021

I was getting Cannot read property 'includes' of undefined and had to switch to npx tsc-alias@1.2.11 for it to work as well.

0reactions
justkey007commented, Jun 7, 2021

@adam-coster Even when I replace the code in project3 with this code using the backticks I don’t see any errors.

import { Controller } from '@controllers/index';

new Controller();

import(`@controllers/index`);

require(`@controllers/index`);

So @mikeahirsch and @kangzeroo can quickly modify the code in node_module and do a console.log(orig) before this code here on line 112 from node_modules/tsc-alias/dist/index.js.

https://github.com/justkey007/tsc-alias/blob/a3ae38d39cb950b865f0dbe4833439f127fbe952/src/index.ts#L180

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to update CubeIDE from 1.3.0 to 1.3.1 instead of 1.4.1
I have choose Window -> Preferences -> Install/Update -> 'Show all versions of available software' and after that when I choose Help ->...
Read more >
Crash after upgrade from 1.3.0 to 1.3.1 #1557 - GitHub
Since I updated to coroutines 1.3.1 on Android projects it started to crash on all existing 3rd libraries that using coroutines too.
Read more >
Problem with updating compose version to 1.3.0-alpha01
Currently the latest version of compose.compiler is 1.3.1 . ... I am using compose_version is 1.3.0-beta01 which is working fine for me.
Read more >
Compose Material - Android Developers
Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input. Declaring dependencies. To add a dependency on...
Read more >
LICENSE - Apple Open Source
See the Open Source Initiative licenses page for details on individual licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in matplotlib toolkits.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found