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

add react-dates dependency #56

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ionlizarazu
Copy link
Member

No description provided.

@ionlizarazu ionlizarazu requested a review from pnicolli December 13, 2022 13:17
@pnicolli
Copy link
Member

I am ok with adding the dependency. I would add the same version we use in Volto though, for consistency. Or at least anything that won't get us a double react-dates dep in node_modules. Also, while we're here, maybe it's worth adding rc-time-picker if you have a few extra minutes to spare.

package.json Outdated Show resolved Hide resolved
add missing comma
@mliebischer
Copy link
Member

mliebischer commented Jan 14, 2025

It would be awesome if someone could merge and release the changes. 🙏


Background: In one of our customer projects we had the problem that the build failed today because the react-dates dependency was missing. In our project, volto-form-block was customized, but I suspect that this could also affect other developers and projects.

If anyone is interested, here is the error message:

ERROR in ./src/addons/bsbw-theme/src/customizations/volto-form-block/components/Widget/DatetimeWidget.jsx 27:0-32
Module not found: Error: Can't resolve 'react-dates/initialize' in '/home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/volto-form-block/components/Widget'
resolve 'react-dates/initialize' in '/home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/volto-form-block/components/Widget'
  Parsed request is a module
  using description file: /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/package.json (relative path: ./src/customizations/volto-form-block/components/Widget)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/volto-form-block/components/Widget/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/volto-form-block/components/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/volto-form-block/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/customizations/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/src/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/bsbw-theme/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/addons/node_modules doesn't exist or is not a directory
      /home/interaktiv/dev/customer-project/src/node_modules doesn't exist or is not a directory
      looking for modules in /home/interaktiv/dev/customer-project/node_modules
        /home/interaktiv/dev/customer-project/node_modules/react-dates doesn't exist
      looking for modules in /home/interaktiv/dev/node_modules
        /home/interaktiv/dev/node_modules/react-dates doesn't exist
      looking for modules in /home/interaktiv/node_modules
        /home/interaktiv/node_modules/react-dates doesn't exist
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /home/interaktiv/dev/customer-project/node_modules
        /home/interaktiv/dev/customer-project/node_modules/react-dates doesn't exist
      looking for modules in /home/interaktiv/dev/customer-project/src
        /home/interaktiv/dev/customer-project/src/react-dates doesn't exist
 @ ./node_modules/volto-form-block/src/components/Widget/index.js 4:0-94 4:0-94
 @ ./node_modules/volto-form-block/src/components/View.jsx 14:0-61 203:22-29
 @ ./node_modules/volto-form-block/src/index.js 4:0-52 23:12-16 130:0-87
 @ ../../../../tmp/tmp-88949-1tM10tgXEqT4-.js 51:0-46 70:1044-1058
 @ ./node_modules/@plone/volto/src/config/index.js 18:0-72 148:16-26 211:0-23
 @ ./node_modules/@plone/volto/src/start-client.jsx 3:0-29
 @ ./src/client.js 9:0-47 10:0-6

We fixed it by manually adding the dependency to the package.json of the project.

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

Successfully merging this pull request may close these issues.

6 participants