Skip to content

runExampleApp.sh Build Error #525

@william-ly-ibm

Description

@william-ly-ibm

Description

I am trying to use ./runExampleApp.sh to run the example application, however I am running into an error when the script begins building components.

Error Output:

Building components...
➤ YN0000: [@ibm-watson/discovery-react-components]: Process started
➤ YN0000: [@ibm-watson/discovery-styles]: Process started
➤ YN0000: [@ibm-watson/discovery-react-components]: [!] Error: Cannot find module '../cache-contexts'
➤ YN0000: [@ibm-watson/discovery-react-components]: Require stack:
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@babel\core\lib\config\helpers\config-api.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@babel\core\lib\config\files\configuration.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@babel\core\lib\config\files\index.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@babel\core\lib\index.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@svgr\plugin-jsx\lib\index.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@svgr\core\lib\plugins.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@svgr\core\lib\convert.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@svgr\core\lib\index.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules@svgr\rollup\lib\index.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\packages\discovery-react-components\rollup.config.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules\rollup\dist\shared\loadConfigFile.js
➤ YN0000: [@ibm-watson/discovery-react-components]: - C:\...\discovery-components\node_modules\rollup\dist\bin\rollup

To resolve this, I attempted to create the ./cache-contexts file because after checking a working version that I had of the example application, it appeared to just be an empty file.

The error above was resolved, however I'm now facing another issue:

Error output:

Building components...
➤ YN0000: [@ibm-watson/discovery-react-components]: Process started
➤ YN0000: [@ibm-watson/discovery-styles]: Process started
➤ YN0000: [@ibm-watson/discovery-styles]: Process exited (exit code 0), completed in 4s 7ms
➤ YN0000: [@ibm-watson/discovery-react-components]:
➤ YN0000: [@ibm-watson/discovery-react-components]: src/index.tsx → dist/index.es.js, dist/index.es.min.js...
➤ YN0000: [@ibm-watson/discovery-react-components]: [!] (plugin rpt2) Error: Could not resolve '../../modules/es6.object.to-string' from ../../modules/es6.object.to-string?commonjs-external
➤ YN0000: [@ibm-watson/discovery-react-components]:
➤ YN0000: [@ibm-watson/discovery-react-components]: at error (C:\...\discovery-components\node_modules\rollup\dist\shared\rollup.js:198:30)
➤ YN0000: [@ibm-watson/discovery-react-components]: at ModuleLoader.handleResolveId (C:\...\discovery-components\node_modules\rollup\dist\shared\rollup.js:22661:24)
➤ YN0000: [@ibm-watson/discovery-react-components]: at C:\...\discovery-components\node_modules\rollup\dist\shared\rollup.js:22624:26
➤ YN0000: [@ibm-watson/discovery-react-components]:
➤ YN0000: [@ibm-watson/discovery-react-components]: Process exited (exit code 1), completed in 1m 12s

I am unsure now what to do.

What package(s) (including version) are you using?

node: v16.20.1
yarn: 3.2.3

Steps to reproduce the issue

Running ./runExampleApp.sh after installing the pre-requisites listed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions