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

runExampleApp.sh Build Error #525

Open
william-ly-ibm opened this issue Jul 17, 2023 · 2 comments
Open

runExampleApp.sh Build Error #525

william-ly-ibm opened this issue Jul 17, 2023 · 2 comments

Comments

@william-ly-ibm
Copy link

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.

@jhpedemonte
Copy link
Member

A couple of us ran the script and had no issues. My guess, from the logs you posted, is that there is something wrong with your yarn cache. I would suggest running yarn install --check-cache to see if that helps. If not, try deleting node_modules in the top-level of the repo, as well as your ~/.yarn/cache.

@jhpedemonte
Copy link
Member

Oh, just noticed that you seem to be on a Windows system. We didn't test on such a system (I'm not sure any of us have access to one). Not sure what could be going wrong.

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

No branches or pull requests

2 participants