wrong `globals.d.ts` path in `remix.env.d.ts` @remix-run/node 1.6.2
See original GitHub issueWhat version of Remix are you using?
1.6.2
Steps to Reproduce
- Run
npx create-remix@latest
. - Select
Just the basics
/Vercel
/TypeScript
. - Install dependencies. (
npm
oryarn
) - see
remix.env.d.ts
file.
Expected Behavior
/// <reference types="@remix-run/dev" />
/// <reference types="@remix-run/node/globals" />
no error in this remix.env.d.ts
.
Actual Behavior
but not found "@remix-run/node/globals"
To avoid the error, I tried to something:
1. change path @remix-run/node/globals -> @remix-run/node/dists/globals
/// <reference types="@remix-run/dev" />
/// <reference types="@remix-run/node/dists/globals" />
2. or typesVersions in package.json
// @remix-run/node/package.json
{
// ...
"typesVersions": {
"*": {
"globals": ["./dist/globals.d.ts"]
}
},
// ...
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Environment Variables - Remix
Running remix build compiles using the value of process.env.NODE_ENV if it corresponds with a valid mode: "production", "development" or "test". If the value...
Read more >ts-node ignores d.ts files while tsc successfully compiles the ...
I've found that /// <reference path="./types/global.d.ts" /> does the trick but I'd have to repeat it in every file using global.app . My ......
Read more >nx jest unexpected token 'export' - You.com | The AI Search ...
When I run jest, on some test it will throw an error about failure to import .js files with export in them. Strange...
Read more >Remix integration sets up the wrong port by default - Fly.io
On an app created and launched with create-remix latest and flyctl latest I don't have a .env file, and remix.env.d.ts is empty other...
Read more >TypeScript errors and how to fix them
error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. Broken Code ❌. index.d ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@david-crespo
installGlobals
is re-exported at the root do I don’t think you should need the deep import. Doesimport { installGlobals } from '@remix-run/node
work for you?Closing this out as this should be fixed in
1.6.3
- please re-open if you still run into issues!