atomicdata-dev / atomic-data-browser

This repo is no longer used! Code is moved to Atomic-Server
https://github.com/atomicdata-dev/atomic-server/issues
MIT License
56 stars 9 forks source link

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

Closed joepio closed 1 year ago

joepio commented 1 year ago

@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'
jerlendds commented 1 year ago

Some more information on the errors: image

joepio commented 1 year ago

Is probably caused by typescript not creating valid JS files:

https://github.com/microsoft/TypeScript/issues/42151

joepio commented 1 year ago

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