You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did try it and it used to work. I'm traveling now so won't be able to
get you the exact error message till I get back next week. I'm using
"NodeNext" for the module settings.
I was able to remote in and tried that case. It now complains about the lack of a declaration file. I have installed @types/punycode but that didn’t solve it.
You may want to consider following the instructions in the README > Installation, using the recommended code line:
Well I'm quite out of my depth by now, as I am no TypeScript expert, and this should probably be converted into an enhancement request for built-in TypeScript support, so that you don't have to jump through hoops.
However, I tried to simulate what you're doing and after I added the following file, I didn't get errors from import.
Filename: punycode.d.ts
with the one line
declare module 'punycode/punycode.js';
If that doesn't work, then it would be helpful if you could supply a minimum reproducible example, including
Maybe spoke too soon – still getting runtime error …
From: Bob Frankston ***@***.***>
Sent: Monday, November 6, 2023 20:40
To: 'mathiasbynens/punycode.js' ***@***.***>; 'mathiasbynens/punycode.js' ***@***.***>
Cc: 'Bob Frankston' ***@***.***>; 'Mention' ***@***.***>
Subject: RE: [mathiasbynens/punycode.js] Importing in node 21 (Issue #132)
I managed to remote in and it worked. Thanks.
Awkward but workable.
From: Mike McCready ***@***.*** ***@***.***> >
Sent: Saturday, November 4, 2023 07:31
To: mathiasbynens/punycode.js ***@***.*** ***@***.***> >
Cc: Bob Frankston ***@***.*** ***@***.***> >; Mention ***@***.*** ***@***.***> >
Subject: Re: [mathiasbynens/punycode.js] Importing in node 21 (Issue #132)
@BobFrankston <https://github.com/BobFrankston>
Well I'm quite out of my depth by now, as I am no TypeScript expert, and this should probably be converted into an enhancement request for built-in TypeScript support, so that you don't have to jump through hoops.
However, I tried to simulate what you're doing and after I added the following file, I didn't get errors from import.
Filename: punycode.d.ts
with the one line
declare module 'punycode/punycode.js';
If that doesn't work, then it would be helpful if you could supply a minimum reproducible example, including
package.json
tsconfig.json
+ your TypeScript file that is using punycode
—
Reply to this email directly, view it on GitHub <#132 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJ4ONDSFUZW5BOPOKIJQHLYCZGSTAVCNFSM6AAAAAA63GYALSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTGQ3DAMRUGA> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/ABJ4ONFAFNIVSZ5M7VZNA33YCZGSTA5CNFSM6AAAAAA63GYALSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTK4YEBA.gif> Message ID: ***@***.*** ***@***.***> >
Activity
MikeMcC399 commentedon Nov 3, 2023
@BobFrankston
Have you tried the following?
Your full error message may have suggested this.
BobFrankston commentedon Nov 3, 2023
BobFrankston commentedon Nov 3, 2023
MikeMcC399 commentedon Nov 4, 2023
@BobFrankston
You may want to consider following the instructions in the README > Installation, using the recommended code line:
It sounds like you are using TypeScript.
BobFrankston commentedon Nov 4, 2023
MikeMcC399 commentedon Nov 4, 2023
@BobFrankston
Well I'm quite out of my depth by now, as I am no TypeScript expert, and this should probably be converted into an enhancement request for built-in TypeScript support, so that you don't have to jump through hoops.
However, I tried to simulate what you're doing and after I added the following file, I didn't get errors from
import.Filename:
punycode.d.tswith the one line
If that doesn't work, then it would be helpful if you could supply a minimum reproducible example, including
+ your TypeScript file that is using
punycodeBobFrankston commentedon Nov 4, 2023
BobFrankston commentedon Nov 7, 2023
BobFrankston commentedon Nov 7, 2023
hrueger commentedon Jan 21, 2024
I just submitted a patch for this to DefinitelyTyped: DefinitelyTyped/DefinitelyTyped#68273 🎉