Can't serve rollup bundle due to 'Could not find ${fileToRun}' error #23029
Labels
scope: bundlers
Issues related to webpack, rollup
scope: node
Issues related to Node, Express, NestJS support for Nx
type: bug
Current Behavior
The error below occurs when I try to serve an express app bundled with
@nx/rollup:rollup
:/Users/aoseni/Temp/analysis-web/node_modules/@nx/js/src/executors/node/node.impl.js:287
throw new Error(
Could not find ${fileToRun}. Make sure your build succeeded.
);^
Error: Could not find /Users/aoseni/Temp/analysis-web/dist/apps/ds-graphql-api/main.js. Make sure your build succeeded.
at fileToRunCorrectPath (/Users/aoseni/Temp/analysis-web/node_modules/@nx/js/src/executors/node/node.impl.js:287:11)
at /Users/aoseni/Temp/analysis-web/node_modules/@nx/js/src/executors/node/node.impl.js:97:49
at new Promise ()
at Object.start (/Users/aoseni/Temp/analysis-web/node_modules/@nx/js/src/executors/node/node.impl.js:91:36)
at Timeout.processQueue [as _onTimeout] (/Users/aoseni/Temp/analysis-web/node_modules/@nx/js/src/executors/node/node.impl.js:62:13)
Node.js v18.19.0
Expected Behavior
Express app should start correctly.
GitHub Repo
https://github.com/adexot/nx-express-rollup
Steps to Reproduce
yarn nx run express-rollup:build-rollup
to build the nx appyarn nx run express-rollup:serve
to serve the appThe above should result in the error:
throw new Error(
Could not find ${fileToRun}. Make sure your build succeeded.
);Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: