You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I switched my monorepo to NX, previously the package.json file had some scripts, after building the app the package.json file also copied into dist.
Now I can deploy the dist dir of each app separately and run something like npm run start from it
Now everything is changed. I removed the scripts section from package.json and added empty targets in project.json in each app, and defined the target defaults in nx.json
Now when I build the app and copy package.json into dist and upload the dist dir, it has no scripts
I tried to copy both the root nx.json and the project's project.json, but not worked, also, in my local machine, nx see that I have duplicate workspaces, also I want to test serving the app from dist as I'll do after deploying it
i.e. runnng nx run-many -t serve will build the app from the source ode, and then serve it, which is not the desired behavior to test how the compiled app will run on the server after deploying it
Expected Behavior
I can run npm start to serve the compiled app without building from the source, and without deploying the souce code at all
GitHub Repo
No response
Steps to Reproduce
Add nx to n existing monorepo
Define the targetDefaults in the root nx.json
Define the targets (can be empty or merged with targetDefaults) in the project's project.json
Remove the scripts section from package.json
Build the app
deploy or upload the dist dir and run npm start, the start command is not defined in package.json
Current Behavior
I switched my monorepo to NX, previously the package.json file had some scripts, after building the app the package.json file also copied into dist.
Now I can deploy the dist dir of each app separately and run something like
npm run start
from itNow everything is changed. I removed the scripts section from package.json and added empty targets in project.json in each app, and defined the target defaults in nx.json
my-app/project.json
nx.json
Now when I build the app and copy package.json into dist and upload the dist dir, it has no scripts
I tried to copy both the root nx.json and the project's project.json, but not worked, also, in my local machine, nx see that I have duplicate workspaces, also I want to test serving the app from dist as I'll do after deploying it
i.e. runnng
nx run-many -t serve
will build the app from the source ode, and then serve it, which is not the desired behavior to test how the compiled app will run on the server after deploying itExpected Behavior
I can run
npm start
to serve the compiled app without building from the source, and without deploying the souce code at allGitHub Repo
No response
Steps to Reproduce
npm start
, the start command is not defined in package.jsonNx Report
Failure Logs
Package Manager Version
pnpm
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: