toolsplus / nx-forge

Atlassian Forge plugin for Nx
https://toolsplus.github.io/nx-forge/
MIT License
17 stars 4 forks source link

Cannot copy to a subdirectory of itself #70

Closed trevordilley closed 4 months ago

trevordilley commented 4 months ago

I get this error when I attempt to run npx nx build app

I'm on node 18 I'm using Nx version 17.2.8 to match what's in this repo. I'm on an Apple M1 Pro running Ventura I run the following commands to setup the project

npx create-nx-workspace@17.2.8 --packageManager yarn showcase
# Choose None, Integrated, No for the options

cd showcase
yarn add -D @nx/node@17.2.8 @nx/react@17.2.8 @toolsplus/nx-forge
npx nx g @toolsplus/nx-forge:app app
# copy the manifest file from Usage docs https://github.com/toolsplus/nx-forge/blob/main/packages/nx-forge/README.md#wire-the-custom-ui-project-with-the-forge-app-project
# Update the <custom-ui-app-name> to app

npx nx build app

I then get the following error

 >  NX   Cannot copy '/Users/trevor/TwentyIdeas/atlassian/showcase/dist/app' to a subdirectory of itself, '/Users/trevor/TwentyIdeas/atlassian/showcase/dist/app/customUI/app'.

Error: Cannot copy '/Users/trevor/TwentyIdeas/atlassian/showcase/dist/app' to a subdirectory of itself, '/Users/trevor/TwentyIdeas/atlassian/showcase/dist/app/customUI/app'.
    at Object.checkPathsSync (/Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/@toolsplus/nx-forge/node_modules/fs-extra/lib/util/stat.js:89:11)
    at copySync (/Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/@toolsplus/nx-forge/node_modules/fs-extra/lib/copy/copy-sync.js:27:38)
    at verifyAndCopyCustomUIDependency (/Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/@toolsplus/nx-forge/src/executors/build/lib/process-custom-ui-dependencies.js:43:29)
    at /Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/@toolsplus/nx-forge/src/executors/build/lib/process-custom-ui-dependencies.js:23:34
    at Array.forEach (<anonymous>)
    at /Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/@toolsplus/nx-forge/src/executors/build/lib/process-custom-ui-dependencies.js:23:19
    at Generator.next (<anonymous>)
    at fulfilled (/Users/trevor/TwentyIdeas/atlassian/showcase/node_modules/tslib/tslib.js:166:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
trevordilley commented 4 months ago

Oh lol, I just used the forge app name instead of the react app name when following the usage documentation. my bad :)