Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: lib/components.ts(6,15): error TS2305: Module '"stencil-library"' has no exported member 'JSX'. #427

Open
3 tasks done
loremru opened this issue Apr 12, 2024 · 4 comments
Labels
help wanted a good issue for the community type: bug Something isn't working

Comments

@loremru
Copy link

loremru commented Apr 12, 2024

Prerequisites

Stencil Version

v4.15

Current Behavior

✖ vue-library:build
> [email protected] build
> npm run tsc

  > [email protected] tsc
  > tsc -p . --outDir ./dist
  
  lib/components.ts(6,15): error TS2305: Module '"stencil-library"' has no exported member 'JSX'.
  npm ERR! Lifecycle script `tsc` failed with error: 
  npm ERR! Error: command failed 
  npm ERR!   in workspace: [email protected] 
  npm ERR!   at location: /Users/loremru/Desktop/work/mine/mj/mj-ds/packages/vue-library 
  npm ERR! Lifecycle script `build` failed with error: 
  npm ERR! Error: command failed 
  npm ERR!   in workspace: [email protected] 
  npm ERR!   at location: /Users/loremru/Desktop/work/mine/mj/mj-ds/packages/vue-library 

Expected Behavior

build

System Info

System: node 18.16.0
    Platform: darwin (23.2.0)
   CPU Model: Apple M1 Pro (10 cpus)
    Compiler: /Users/loremru/Desktop/work/mine/mj/mj-ds/node_modules/@stencil/core/compiler/stencil.js
       Build: 1712585430
     Stencil: 4.15.0 🎖
  TypeScript: 5.4.4
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.30.0

Steps to Reproduce

follow docs with lerna
https://stenciljs.com/docs/vue

Code Reproduction URL

https://github.com/loremru/stencil-bug-0

Additional Information

please improve docs and give template with lerna. Stencil defines as build-tool but haven't an example for building

@ionitron-bot ionitron-bot bot added the triage label Apr 12, 2024
@tanner-reits tanner-reits transferred this issue from ionic-team/stencil Apr 12, 2024
@tanner-reits
Copy link
Member

@loremru Transferred this issue over to the framework wrapper repo. At this time, the framework wrappers are only maintained to support the Ionic Framework, so we are not sure when this work will be prioritized. We welcome any community contributions if you'd like to take a stab at this yourself!

@callistusasir
Copy link

callistusasir commented May 14, 2024

This worked to produce a successful build, add this to your index.ts file in your main stencil project and try and build it.

import { JSX } from './components'; // Replace with your relative directory

export { format } from './utils/utils';  // Replace with your relative directory

export { JSX }

@venkatesh-nagineni
Copy link

the workaround not working because this index.ts get's overwritten not include any types, inside dist/components there is index.d.ts file but this file not really generated from src folder index.ts

@christian-bromann christian-bromann added type: bug Something isn't working help wanted a good issue for the community and removed triage labels Oct 14, 2024
Copy link

ionitron-bot bot commented Oct 14, 2024

This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.

If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted a good issue for the community type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants