Giter Club home page Giter Club logo

Comments (8)

ccrockett avatar ccrockett commented on May 27, 2024 5

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

from add-typescript-to-cypress.

shewood avatar shewood commented on May 27, 2024 1

I have the same issue. Any solution?

from add-typescript-to-cypress.

bahmutov avatar bahmutov commented on May 27, 2024 1

from add-typescript-to-cypress.

michaelfaisst avatar michaelfaisst commented on May 27, 2024

same here. @bahmutov any idea?

from add-typescript-to-cypress.

rjriel avatar rjriel commented on May 27, 2024

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?

from add-typescript-to-cypress.

bahmutov avatar bahmutov commented on May 27, 2024

@rjriel is this the same problem? I don't see how it relates.

from add-typescript-to-cypress.

bahmutov avatar bahmutov commented on May 27, 2024

I think the solution by @ccrockett in #57 (comment) 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).

from add-typescript-to-cypress.

rjriel avatar rjriel commented on May 27, 2024

@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

from add-typescript-to-cypress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.