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

Uncaught Error: not implemented in deno:cli/tsc/06_util.js #7630

Closed
mknj opened this issue Sep 22, 2020 · 1 comment · Fixed by #7635
Closed

Uncaught Error: not implemented in deno:cli/tsc/06_util.js #7630

mknj opened this issue Sep 22, 2020 · 1 comment · Fixed by #7635
Assignees
Labels
bug Something isn't working correctly cli related to cli/ dir

Comments

@mknj
Copy link

mknj commented Sep 22, 2020

I try to convert a bigger library to deno and got a not implemented error inside deno. i shrinked the cause down to using 5 small files.

versions

deno 1.4.0
v8 8.7.75
typescript 4.0.2
Ubuntu 20.04.1 LTS

error message

Check file:///...../src/test.js
error: Uncaught Error: not implemented
    at notImplemented (deno:cli/tsc/06_util.js:48:11)
    at IncrementalCompileHost.fileExists (deno:cli/tsc/99_main_compiler.js:279:14)
    at Object.fileExists (deno:cli/tsc/00_typescript.js:103557:33)
    at tryDirectoryWithPackageJson (deno:cli/tsc/00_typescript.js:107929:26)
    at tryGetModuleNameAsNodeModule (deno:cli/tsc/00_typescript.js:107898:30)
    at deno:cli/tsc/00_typescript.js:107691:88
    at Object.mapDefined (deno:cli/tsc/00_typescript.js:804:30)
    at Object.getModuleSpecifiers (deno:cli/tsc/00_typescript.js:107691:29)
    at getSpecifierForModuleSymbol (deno:cli/tsc/00_typescript.js:47148:62)
    at serializeAsAlias (deno:cli/tsc/00_typescript.js:48271:60)

how to reproduce

(i am using patch to create the needed directories and files)

patch -p0 <<EOF
+++ src/a.js
@@ -0,0 +1,2 @@
+import { v4 } from "./d.ts";
+export function a(){};
+++ src/d.ts
@@ -0,0 +1 @@
+export function v4() { return "hello"; }
+++ src/node_modules/b.js
@@ -0,0 +1,2 @@
+import c from "./c.js";
+export { c };
+++ src/node_modules/c.js
@@ -0,0 +1 @@
+export default function c(){};
+++ src/test.js
@@ -0,0 +1,2 @@
+import { a } from "./a.js";
+import { c } from "./node_modules/b.js";
EOF

deno run src/test.js
@kitsonk kitsonk added bug Something isn't working correctly cli related to cli/ dir labels Sep 22, 2020
@kitsonk
Copy link
Contributor

kitsonk commented Sep 22, 2020

Hrrrmmm... It seems that if there is a file that exists in node_modules, TypeScript still scans for things like package.json. We let that in there, as we didn't know of a scenario that it would actually be called, but it seems you found one. I suspect we can just silently ignore it and log it out to the debug in Deno in case we every find another strange behaviour.

Should be a straight forward fix, which I will work on.

@kitsonk kitsonk self-assigned this Sep 22, 2020
kitsonk added a commit to kitsonk/deno that referenced this issue Sep 22, 2020
kitsonk added a commit that referenced this issue Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants