atomicdata-dev/atomic-data-browser

Errors using @tomic/react in js project - Was not found in "module has no exports" type

joepio opened this issue · 3 comments

@studium.dev just noticed this in https://github.com/jerlendds/atomic-data-client

Failed to compile.

Attempted import error: 'Store' is not exported from '@tomic/react' (imported as 'Store').
WARNING in ./node_modules/.pnpm/@tomic+lib@0.34.0/node_modules/@tomic/lib/dist/src/index.js
Module Warning (from ./node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.75.0/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/mellow/Projects/studium.dev/frontend/node_modules/.pnpm/@tomic+lib@0.34.0/node_modules/@tomic/lib/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/mellow/Projects/studium.dev/frontend/node_modules/.pnpm/@tomic+lib@0.34.0/node_modules/@tomic/lib/src/index.ts'

Some more information on the errors:
image

Is probably caused by typescript not creating valid JS files:

microsoft/TypeScript#42151

Fixed, was a tsc problem due to moduleResolution and lack of .js extensions in imports