nx-extensions
nx-extensions copied to clipboard
Build path isn't passed correctly to another builder calling @nxext/stencil:build
Describe the bug When trying to deploy using this plugin: https://github.com/ngx-builders/netlify-builder, I get an error that says "deployment failed" after investigating the source, the error said the file wasn't present.
To Reproduce
- Create nx project
- Create stencil/app
- Follow tutorial here to add deploy to netlify: https://www.netlify.com/blog/2020/04/21/deploying-nx-monorepos-to-netlify/
- Enter the
outputPath": "dist/apps/your-app-output"
- run in the terminal:
NETLIFY_TOKEN=your_token nx deploy your-app
- it will build successfully, but fail to deploy
To Fix
- enter the
outputPath": "../../../dist/apps/your-app-output"
- this is relative to the build script in node_modules
Expected behavior
I would expect to put the path as explained in the tutorial - relative to my project.
outputPath": "dist/apps/your-app-output"
Additional Context Originally posted here: https://github.com/ngx-builders/netlify-builder/issues/119
This bug only happens when combining @nxext/stencil:build
with @netlify-builder/deploy:deploy
- If I only run
@netlify-builder/deploy:deploy
then I have to haveoutputPath": "../../../dist/apps/your-app-output"
(location relative to the script?). - If I build first with
@nxext/stencil:build
then deploy via@netlify-builder/deploy:deploy
(withnoBuild:true
) then the outputPath can bedist/apps/your-app-output
and it will work 👍
netlify-builder/deploy:deploy works with my ionic-react apps, which is why I'm filing this issue with the @nxext/stencil:build