Giter VIP home page Giter VIP logo

Comments (5)

c-sauerborn avatar c-sauerborn commented on May 23, 2024 1

We could fix the issue.
In our jest.preset.js we have some transformations configured and in the transformIgnorePatterns, the file ending cjs was missing. Because of that it was transforming the .cjs files from yargs-parser and convict failed to use those files during the test runs.

transform: {
    '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { rootMode: 'upward' }],
    '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': 'jest-transform-stub',
  },
  transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(cjs|js|jsx|ts|tsx)$']

from node-convict.

nicholeuf avatar nicholeuf commented on May 23, 2024

This same message is a warning in our webpack build. We do not use create-react-app. The warning has been present ever since we introduced this dependency. The warning has bothered me but the benefits of the library were worth it. It would be nice to see this warning resolved.

WARNING in ./node_modules/yargs-parser/build/index.cjs 1021:19-32
Critical dependency: the request of a dependency is an expression
@ ./node_modules/convict/src/main.js 9:18-41

from node-convict.

nicholeuf avatar nicholeuf commented on May 23, 2024

As described in my earlier comment, I am seeing this message as a warning in my webpack build.

While searching for a solution, I found mention of setting CI=false as a solution for preventing these warnings from being treated as errors, which may help you @AntonyM71 .

from node-convict.

c-sauerborn avatar c-sauerborn commented on May 23, 2024

Hello, we have a big react app and receive the same error, when we try upgrading from convict: 6.0.0 to 6.2.2:

TypeError: parseArgs is not a function
        at importArguments ([...]/repo/node_modules/convict/src/main.js:332:16)
        at convict ([...]/repo/node_modules/convict/src/main.js:717:3)

Adding CI=false to the process didn't help. Any other ideas?

from node-convict.

madarche avatar madarche commented on May 23, 2024

Thanks @c-sauerborn 👍

Closing this ticket as this is not a convict problem.

from node-convict.

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.