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
Here's a minimal repro. In a private repository we're using esbuild for bundling and typescript independently for verification, and we're seeing the same issues there.
install with pnpm install, test with pnpm run typescript
The error seems to be in compiled/code-generated output, so it may be a problem with an upstream build tool. As a workaround, for now, we're directly modifying the affected files in node_modules and checking the results in.
full error log:
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/index-9809b963.d.ts:6:50 - error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file 'solid-js/store/types/store.js' instead?
6 import * as solid_js_store_types_store_d_ts from 'solid-js/store/types/store.d.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/index-9809b963.d.ts:9:54 - error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file 'solid-js/types/reactive/signal.js' instead?
9 import * as solid_js_types_reactive_signal_d_ts from 'solid-js/types/reactive/signal.d.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/index.d.ts:5:54 - error TS2846: A declaration file cannot
be imported without 'import type'. Did you mean to import an implementation file 'solid-js/types/reactive/signal.js' instead?
5 import * as solid_js_types_reactive_signal_d_ts from 'solid-js/types/reactive/signal.d.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/setup.d.ts:2:50 - error TS2846: A declaration file cannot
be imported without 'import type'. Did you mean to import an implementation file 'solid-js/store/types/store.js' instead?
2 import * as solid_js_store_types_store_d_ts from 'solid-js/store/types/store.d.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/setup.d.ts:5:54 - error TS2846: A declaration file cannot
be imported without 'import type'. Did you mean to import an implementation file 'solid-js/types/reactive/signal.js' instead?
5 import * as solid_js_types_reactive_signal_d_ts from 'solid-js/types/reactive/signal.d.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/setup.d.ts:40:9 - error TS2403: Subsequent variable declarations must have the same type. Variable 'SolidDevtools$$' must be of type '{ readonly Solid: typeof import("E:/code/solid-sandbox/node_modules/.pnpm/solid-js@1.8.11/node_modules/solid-js/types/index"); readonly Store: typeof import("E:/code/solid-sandbox/node_modules/.pnpm/solid-js@1.8.11/node_modules/solid-js/store/types/index"); ... 13 more ...; readonly getOwnerLocation: (owner: Owner) ...', but here has type '{ readonly Solid: typeof import("E:/code/solid-sandbox/node_modules/.pnpm/solid-js@1.8.11/node_modules/solid-js/types/index"); readonly Store: typeof import("E:/code/solid-sandbox/node_modules/.pnpm/solid-js@1.8.11/node_modules/solid-js/store/types/index"); ... 13 more ...; readonly getOwnerLocation: (owner: Owner) ...'.
40 var SolidDevtools$$: {
~~~~~~~~~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/index-9809b963.d.ts:164:9
164 var SolidDevtools$$: {
~~~~~~~~~~~~~~~
'SolidDevtools$$' was also declared here.
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/setup.d.ts:100:9 - error TS2717: Subsequent property declarations must have the same type. Property 'sdtType' must be of type 'NodeType | undefined', but here has type 'NodeType | undefined'.
100 sdtType?: NodeType;
~~~~~~~
node_modules/.pnpm/@solid-devtools+debugger@0.23.3_solid-js@1.8.11/node_modules/@solid-devtools/debugger/dist/index-9809b963.d.ts:228:9
228 sdtType?: NodeType;
~~~~~~~
'sdtType' was also declared here.
node_modules/.pnpm/@solid-primitives+utils@6.2.2_solid-js@1.8.11/node_modules/@solid-primitives/utils/dist/index/index.d.ts:6:54 - error TS2307: Cannot find module '../node_modules/solid-js/types/reactive/signal.js' or its corresponding type declarations.
6 export { ResolvedChildren, ResolvedJSXElement } from '../node_modules/solid-js/types/reactive/signal.js';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
npm run typescript
> vite-template-solid@0.0.0 typescript
> tsc
node_modules/@solid-devtools/debugger/dist/locator/types.d.ts:1:43 - error TS2307: Cannot find module '@solid-devtools/shared/utils' or its corresponding type declarations.
There are types at '/home/thetarnav/solid-sandbox/node_modules/@solid-devtools/debugger/node_modules/@solid-devtools/shared/dist/utils.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
1 import type { ToDyscriminatedUnion } from '@solid-devtools/shared/utils';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@solid-devtools/debugger/dist/locator/types.d.ts:1
Then I tried to add "type": "module" to package.json and "moduleResolution": "Bundler" and "module": "ESNext" to tsconfig.json and all the errors went away.
Here's a minimal repro. In a private repository we're using esbuild for bundling and typescript independently for verification, and we're seeing the same issues there.
https://github.com/Alloyed/solid-sandbox/tree/TS2846
install with
pnpm install
, test withpnpm run typescript
The error seems to be in compiled/code-generated output, so it may be a problem with an upstream build tool. As a workaround, for now, we're directly modifying the affected files in node_modules and checking the results in.
full error log:
The text was updated successfully, but these errors were encountered: