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
Cannot import @nrwl/js:lib into @nrwl/react:app #8793
Comments
For a workaround and possible solution to the bug, see #8600 (comment) This is actually what a |
@ziacik thanks for that |
The |
…8793, #8600) (#10055) * fix(js): fix(js): adding missing babelrc for tsc compiled libraries ISSUES CLOSED: #8600, #8793 ISSUES CLOSED: #8600, #8793 * feat(js): adds the --skipBabelConfig flag to prevent .babelrc file generation ISSUES CLOSED: #8600, #8793 ISSUES CLOSED: #8600, #8793 * feat(js): adds the --includeBabelRc flag to the library generator adds the --includeBabelRc flag to the library generator, and a mechanism to automatically detect the nrwl/web plugin, which requires auto-generation of the babelrc even when not explicitly set by the user ISSUES CLOSED: #8600, #8793
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I experience a compiler error when trying to run the app. It appears that the app compiler tries to parse lib's index.ts as javascript rather than typescript, likely a babel/webpack misconfiguration somewhere within the generated app?
Expected Behavior
I expect to be able to import the js:lib into the react:app.
Steps to Reproduce
https://github.com/joeflateau/react-ts-lib-repro
npx create-nx-workspace npm i -D @nrwl/react nx g @nrwl/react:app nx g @nrwl/js:lib # edit app.tsx: import lib and console.log it npm run start
Failure Logs
Environment
Node : 16.13.0
OS : darwin arm64
npm : 8.1.4
nx : 13.7.1
@nrwl/angular : undefined
@nrwl/cli : 13.7.1
@nrwl/cypress : 13.7.1
@nrwl/detox : undefined
@nrwl/devkit : 13.7.1
@nrwl/eslint-plugin-nx : 13.7.1
@nrwl/express : undefined
@nrwl/jest : 13.7.1
@nrwl/js : 13.7.1
@nrwl/linter : 13.7.1
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : undefined
@nrwl/nx-cloud : undefined
@nrwl/react : 13.7.1
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/storybook : 13.7.1
@nrwl/tao : 13.7.1
@nrwl/web : 13.7.1
@nrwl/workspace : 13.7.1
typescript : 4.5.5
rxjs : 6.6.7
The text was updated successfully, but these errors were encountered: