Core Imports inconsistent after running V6 Upgrade Kit
Closed this issue · 1 comments
D40298008 commented
Package version
20.11.1 (Node)
Describe the bug
I am trying to upgrade an application to Adonis6 using the upgrade kit. After the upgrade, I am seeing ...has no default export
errors trying to import commands like so:
import server from '@adonisjs/core/services/server'
After running the upgrade kit, I can see the DTS file looks like this and I understand why there's an error.
// node_modules > @adonisjs > core > build > services > server.d.ts
import type { HttpServerService } from '../src/types.js';
declare let server: HttpServerService;
export { server as server };
However, if I create a starter application, I can see the following file as the source and it works fine:
// node_modules > @adonisjs > core > build > services > server.d.ts
import type { HttpServerService } from '../src/types.js';
declare let server: HttpServerService;
export { server as default };
Notice the last line is different. I performed the upgrade kit steps twice to make sure I followed them correctly, but the result was the same. My node version is 20.11.1
in both examples above.
Reproduction repo
No response
D40298008 commented
Ok...I deleted (and recreated) my node_modules
directory and it seems to be working now.