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

@nrwl/js:tsc doesn't have packageJson option #9513

Closed
okmttdhr opened this issue Mar 25, 2022 · 3 comments
Closed

@nrwl/js:tsc doesn't have packageJson option #9513

okmttdhr opened this issue Mar 25, 2022 · 3 comments
Labels
outdated scope: js scope: node Issues related to Node, Express, NestJS support for Nx stale type: bug

Comments

@okmttdhr
Copy link
Contributor

Current Behavior

Trying to migrate from @nrwl/node:package to @nrwl/js:tsc to build publishable libs because of #9086.
Get the following error when I build with @nrwl/js:tsc

Error: ENOENT: no such file or directory, open 'libs/package.json'

Situations;

@nrwl/node:package had packageJson option, but @nrwl/js:tsc does not have it, instead it always refers to ${projectRoot}/package.json.

const packageJson = readJsonFile(join(options.projectRoot, 'package.json'));

In our case, we set root (in project.json) to libs because the library depends on the other librrary.
With packageJson option, we could specify a separate path for package.json, but it doesn't seem to be possible with @nrwl/js:tsc.

Expected Behavior

package.json can be specified with @nrwl/js:tsc

Steps to Reproduce

Failure Logs

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 17.7.1
   OS   : darwin x64
   yarn : 1.22.10

   nx : 13.9.4
   @nrwl/angular : undefined
   @nrwl/cypress : 13.9.4
   @nrwl/detox : undefined
   @nrwl/devkit : 13.9.4
   @nrwl/eslint-plugin-nx : 13.9.4
   @nrwl/express : undefined
   @nrwl/jest : 13.9.4
   @nrwl/js : 13.9.4
   @nrwl/linter : 13.9.4
   @nrwl/nest : undefined
   @nrwl/next : 13.9.4
   @nrwl/node : 13.9.4
   @nrwl/nx-cloud : undefined
   @nrwl/nx-plugin : undefined
   @nrwl/react : 13.9.4
   @nrwl/react-native : undefined
   @nrwl/schematics : undefined
   @nrwl/storybook : 13.9.4
   @nrwl/web : 13.9.4
   @nrwl/workspace : 13.9.4
   typescript : 4.6.2
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:
@pemsbr
Copy link
Contributor

pemsbr commented Mar 25, 2022

re #9466

@FrozenPandaz FrozenPandaz added scope: node Issues related to Node, Express, NestJS support for Nx scope: js labels Mar 25, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: js scope: node Issues related to Node, Express, NestJS support for Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

3 participants