Closed geyuqiu closed 4 years ago
I have the same issue. Any solution?
same here. @bahmutov any idea?
Let me look at this today now that I’m back from a trip
Sent from my iPhone
On Nov 4, 2019, at 08:32, Michael Faißt notifications@github.com wrote:
same here. @bahmutov any idea?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Ran into this issue while building a docker image from someone else's repo. It seems that this package is assuming that cypress/plugins/index.js
already exists
note overwrites existing cypress/plugins/index.js file once. In other installs looks for file cypress/plugins/cy-ts-preprocessor.js to avoid overwriting.
Usually this is not the case when building a docker image.
Seems there are two ways to resolve it:
If you are just trying to create a production docker image (not trying to run tests) then you should use npm install --only=prod
and make sure @bahmutov/add-typescript-to-cypress
package is installed into devDependencies section of package.json.
OR
Add RUN ["mkdir","-p","cypress/plugins"]
to your Dockerfile to create the cypress plugins folder before running npm install
Getting this issue specifically while trying to implement caching of node_modules
in AWS CodeBuild. Hopefully the following lines can help indicate the problem there:
[Container] 2020/04/03 04:46:05 Moving to directory /codebuild/output/src192289327/src/github.com/github-org/github-repo
--
15 | [Container] 2020/04/03 04:46:05 MkdirAll: /codebuild/local-cache/custom/dba27c31aad935787bb275c3e5e4e957708f15386de599eff1db476022cd7e4c/node_modules
16 | [Container] 2020/04/03 04:46:05 Symlinking: /codebuild/output/src192289327/src/github.com/github-org/github-repo/node_modules => /codebuild/local-cache/custom/dba27c31aad935787bb275c3e5e4e957708f15386de599eff1db476022cd7e4c/node_modules
I'm assuming this has something to do with using symlinking, then path.join
and it not actually getting into the source folder.
Thoughts? Suggestions?
@rjriel is this the same problem? I don't see how it relates.
I think the solution by @ccrockett in https://github.com/bahmutov/add-typescript-to-cypress/issues/57#issuecomment-556548024 is the best - either don't install dev dependencies like this one, or have the cypress
folder there (since it should be present to run Cypress tests).
@bahmutov sorry, I may have been confusing, it is the same issue. My docker build fails and I get the error about the cypress folder not being found. My explanation was more detailing how the error in my case is likely due to symlinking and thinking maybe there's a better solution than using path.join
with a bunch of ../
to get to the project directory. I'll do some research and maybe submit a PR