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

Unknown extension during import of dependency module #852

Closed
agolomoodysaada opened this issue Sep 28, 2018 · 5 comments
Closed

Unknown extension during import of dependency module #852

agolomoodysaada opened this issue Sep 28, 2018 · 5 comments

Comments

@agolomoodysaada
Copy link

agolomoodysaada commented Sep 28, 2018

myfile.ts

import * as inquirer from 'https://unpkg.com/inquirer@6.2.0/lib/inquirer.js'

run deno version: v0.1.5

deno myfile.ts

Error shows up

Error: Debug Failure. File /Users/myusername/.deno/deps/unpkg.com/inquirer@6.2.0/lib/objects/separator has unknown extension.
    at Object.extensionFromPath (deno/third_party/node_modules/typescript/lib/typescript.js:14997:48)
    at deno/third_party/node_modules/typescript/lib/typescript.js:82567:46
    at Array.map (<anonymous>)
    at resolveModuleNamesWorker (deno/third_party/node_modules/typescript/lib/typescript.js:82561:195)
    at resolveModuleNamesReusingOldState (deno/third_party/node_modules/typescript/lib/typescript.js:82768:24)
    at processImportedModules (deno/third_party/node_modules/typescript/lib/typescript.js:84005:35)
    at findSourceFile (deno/third_party/node_modules/typescript/lib/typescript.js:83880:17)
    at processImportedModules (deno/third_party/node_modules/typescript/lib/typescript.js:84041:25)
    at findSourceFile (deno/third_party/node_modules/typescript/lib/typescript.js:83880:17)
    at deno/third_party/node_modules/typescript/lib/typescript.js:83739:85
@kevinkassimo
Copy link
Contributor

inquirer.Separator = require('./objects/separator');

This caused the file to be downloaded as separator, which does not have an extension. Furthermore, I believe the package still has a lot of issues besides this one, including its reliance on package.json for importing other modules (like chalk).

@agolomoodysaada
Copy link
Author

agolomoodysaada commented Sep 28, 2018

Should deno be able to support certain features like "extension-less paths" at import time? What's the course of action here?

@ry
Copy link
Member

ry commented Sep 28, 2018

I'm not opposed to supporting it - it'll make adoption easier.

@kitsonk
Copy link
Contributor

kitsonk commented Sep 28, 2018

@ry point though, your not implying supporting require() though, so this would still fail.

@agolomoodysaada
Copy link
Author

Closing this issue in favor of #857 discussion. Thank you everyone

hardfist pushed a commit to hardfist/deno that referenced this issue Aug 7, 2024
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