compiling issue with import { WebSocketServer } from "npm:ws@^8.14.1"

Using this impot in a "deno run --unstable [etc...]" env works flawless / as intended but trying to compile it, all of a sudden i get
'"internal:///missing_dependency.d.ts"' has no exported member 'WebSocketServer'
'"internal:///missing_dependency.d.ts"' has no exported member 'WebSocketServer'
DAHDeno AI Helper9/13/2023
I'm sorry to hear you're having trouble with compiling your Deno project. According to the documentation, the deno compile command is still considered unstable and has some limitations. One of these limitations is that dynamic imports are not currently supported. However, the error message you're seeing seems to suggest that the WebSocketServer export cannot be found in the ws module. This could be due to a variety of reasons, such as the specific version of the ws module not having this export, or the module not being correctly downloaded or cached by Deno. Here are a few things you could try: 1. Make sure you're using the correct version of the ws module that includes the WebSocketServer export. 2. Try clearing Deno's dependency cache with deno cache --reload to ensure the latest version of the module is downloaded. 3. Make sure you're using the latest version of Deno, as improvements and bug fixes are regularly added. If none of these suggestions work, I would recommend creating an issue on the Deno GitHub repository, as the maintainers may be able to provide more specific assistance.
1. is ( it works in the "deno run" enviorment but not in the "deno compile" 2. does not change the result 3. does not change the result
Can you open an issue about it?
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 330 million projects.

Looking for more? Join the community!

Recommended Posts
Is there any way to get Deno to not statically analyze import()?I understand that statically analyzing and fetching dynamic import() calls is a good thing for perfoUsing Deno in Frontend.Hey, I was wandering if it is possible to use Deno for Vanilla Frontend development. I dont want to Excluding certain directories when using "walk"Hello, I'm writing a script that should crawl through a directory and search for a given text insideSyntax Error: Unexpected token 'export'Hello, We are using Supabase Deno Edge Functions and are getting this error while trying to import aDeno Deploy QuestionsHey there. We are using Supabase to run edge functions, which in turn built their feature on top of Bunle OAK static assets to the compiled binaryHi, I am currently switching from NodeJS to Deno, and so far so good! One of the reasons for this sThe requested module does not provide an export named 'default'I'm trying to export the following interface: ```import User from '../models/User.ts'; export defaI want to contribute to deno without disturbing my libs in linux . Is there a way?**Noob alert** I have been trying to contribute to deno . So i followed these instructions https://dTimezones in Dates?Hi everyone, what's the right way to create a `Date` with a specific timezone?Resolving Class constructor errorHello, I am currently trying to port a small test api from NodeJS to Deno. This code uses only NPM pKV list is returning an empty iterator, but data is there and gettable via getHello. To simplify things, I am setting a key of `["accounts", account.name]` but when I try to get Read permission & NPM importsHello, I'm using `--allow-read=.` to allow a script to read files in the current directory. The scri