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

Error: Cannot copy '../semver/bin/semver.js' to a subdirectory of itself #813

Closed
BryanHunt opened this issue Jan 12, 2022 · 11 comments · Fixed by #962
Closed

Error: Cannot copy '../semver/bin/semver.js' to a subdirectory of itself #813

BryanHunt opened this issue Jan 12, 2022 · 11 comments · Fixed by #962

Comments

@BryanHunt
Copy link

If you run test:ember-compatibility more than once, it fails with the following:

Error!
Error: Cannot copy '../semver/bin/semver.js' to a subdirectory of itself, '../semver/bin/semver.js'.
Error: Cannot copy '../semver/bin/semver.js' to a subdirectory of itself, '../semver/bin/semver.js'.
    at /home/*****/*****/e4a/node_modules/fs-extra/lib/copy/copy.js:210:21
    at FSReqCallback.oncomplete (node:fs:188:23)

Steps to reproduce:

ember addon e4a
cd e4a
npm install
npm run test:ember-compatibility
num run test:ember-compatibility

I had a co-worker try the same steps and he got the same error.

@ro0gr
Copy link

ro0gr commented Jan 13, 2022

Same for me. Surprisingly it does also reproduce in GH Actions steps https://github.com/san650/ember-cli-page-object/runs/4800467424?check_suite_focus=true#step:5:30 🤔

using the latest [email protected]

@knownasilya
Copy link

knownasilya commented Jan 13, 2022

Seeing this but with handlebars. Using yarn 1.

Can see here: nickschot/ember-gesture-modifiers#188
For me it did it after the first run, now I can't run try:each at all, even if I clear lockfile, node_modules and npm cache.

@knownasilya
Copy link

knownasilya commented Jan 13, 2022

Looks like maybe it needs a change like

await fs.copy(source, destination);

to

await fs.copy(source, destination, {dereference: true});

@ro0gr
Copy link

ro0gr commented Jan 13, 2022

FYI, For me downgrading to the [email protected] worked around this issue.

@oliverlangan
Copy link

We're also seeing it in our CI system.

jherdman added a commit to evoactivity/ember-svg-jar that referenced this issue Jan 22, 2022
@sly7-7
Copy link

sly7-7 commented Feb 3, 2022

For me it did it after the first run, now I can't run try:each at all, even if I clear lockfile, node_modules and npm cache.

@knownasilya I had the same problem here, trying to run ember try:one on ember-elsewhere. To make it work again, I have to manually rm .node_modules.ember-try package-lock.json.ember-try package.json.ember-try
Seems like the "cleanup" (or the revert to the "initial state" of dependencies is not done correctly after running ember try.

Also, the buggy behavior is independent from running with yarn 1 or npm

NullVoxPopuli added a commit to NullVoxPopuli/ember-resources that referenced this issue Feb 6, 2022
Revert back to ^1.0.0 of ember-try, due to:
 - issue: ember-cli/ember-try#813
 - pr: ember-cli/ember-try#821
mrloop added a commit to mrloop/ember-sortable that referenced this issue Mar 14, 2022
mrloop added a commit to mrloop/ember-sortable that referenced this issue Mar 14, 2022
NullVoxPopuli pushed a commit to mrloop/ember-sortable that referenced this issue Apr 8, 2022
wagenet added a commit to wagenet/ember-try that referenced this issue Apr 14, 2022
There is no `clobber` option. `overwrite` appears to do what was intended.

Fixes ember-cli#813
maxwondercorn pushed a commit to Glavin001/ember-c3 that referenced this issue Jun 13, 2022
jembezmamy added a commit to spruce/ember-form-builder that referenced this issue Aug 1, 2022
amk221 added a commit to amk221/ember-animated-routes that referenced this issue Sep 7, 2022
malgasm added a commit to dictatelife/ember-cli-dompurify that referenced this issue Sep 11, 2022
rpemberton added a commit to rpemberton/ember-cli-app-version that referenced this issue Jan 3, 2023
Fixes error: [test:ember-compatibility] Error: Cannot copy '../../../browserslist/cli.js' to a subdirectory of itself, '../../../browserslist/cli.js'.

Likely related issue: ember-cli/ember-try#813
rpemberton added a commit to rpemberton/ember-cli-app-version that referenced this issue Jan 3, 2023
Fixes error: [test:ember-compatibility] Error: Cannot copy '../../../browserslist/cli.js' to a subdirectory of itself, '../../../browserslist/cli.js'.

Likely related issue: ember-cli/ember-try#813
@jelhan
Copy link
Contributor

jelhan commented Mar 25, 2023

I run into the same issue. For me it was solved as well by deleting .node_module.ember-try folder as described by @sly7-7.

@mansona
Copy link
Member

mansona commented Mar 25, 2023

I imagine this would be fixed if we ever went through with #598 🤔

@kategengler
Copy link
Member

We should do #598 but this issue has also been fixed in #912

@mansona
Copy link
Member

mansona commented Mar 25, 2023

Ah so I guess the next big thing would be to get a release out 🤔 quite a few fixes ready to go. I'll start a conversation in #dev-ember-cli about this 👍

@grapho
Copy link

grapho commented Apr 6, 2023

I'm getting this error as well.. but for an acorn package ... it appears the 3.0 beta fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants