Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Cannot run the demo? #26

Closed
jeromesimeon opened this issue Feb 20, 2020 · 8 comments
Closed

Cannot run the demo? #26

jeromesimeon opened this issue Feb 20, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@jeromesimeon
Copy link
Member

jeromesimeon commented Feb 20, 2020

Describe the bug
Not sure what I'm doing wrong, or if it's something of a regression, but on a fresh build:

bash-3.2$ lerna bootstrap 
lerna bootstrap 
lerna notice cli v3.20.2
lerna info Bootstrapping 3 packages
lerna info Symlinking packages and binaries
lerna success Bootstrapped 3 packages
bash-3.2$ npm run build 
npm run build 

> @accordproject/concerto-ui@ build /Users/jeromesimeon/git/gold/concerto-ui
> lerna exec -- npm run build

lerna notice cli v3.20.2
lerna info Executing command in 3 packages: "npm run build"

> @accordproject/concerto-ui-core@0.82.9 build /Users/jeromesimeon/git/gold/concerto-ui/packages/concerto-ui-core
> rm -rf dist && NODE_ENV=production babel src --out-dir dist --ignore '**/*.spec.js,**/*.test.js,samples,__snapshots__,**/*.stories.js'

Successfully compiled 4 files with Babel.

> @accordproject/concerto-ui-react@0.82.9 build /Users/jeromesimeon/git/gold/concerto-ui/packages/concerto-ui-react
> rm -rf dist && NODE_ENV=production babel src --out-dir dist --copy-files --ignore '**/*.spec.js,**/*.test.js,samples,__snapshots__,**/*.stories.js'

Successfully compiled 6 files with Babel.

> @accordproject/concerto-ui-react-demo@0.82.9 build /Users/jeromesimeon/git/gold/concerto-ui/packages/concerto-ui-react-demo
> react-scripts build

Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Compiled successfully.

File sizes after gzip:

  290.16 KB  build/static/js/2.0c104230.chunk.js
  97.26 KB   build/static/css/2.0554bc4f.chunk.css
  7.42 KB    build/static/js/main.8ff4c625.chunk.js
  762 B      build/static/js/runtime~main.a8a9905a.js
  456 B      build/static/css/main.c681997c.chunk.css

The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://bit.ly/CRA-deploy

lerna success exec Executed command in 3 packages: "npm run build"
bash-3.2$ npm run demo:react
npm run demo:react

> @accordproject/concerto-ui@ demo:react /Users/jeromesimeon/git/gold/concerto-ui
> cd packages/concerto-ui-react-demo && npm run start


> @accordproject/concerto-ui-react-demo@0.82.9 start /Users/jeromesimeon/git/gold/concerto-ui/packages/concerto-ui-react-demo
> react-scripts start

�[3JStarting the development server...

Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
�[3JCompiled successfully!

You can now view @accordproject/concerto-ui-react-demo in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://10.0.1.8:3000/

Note that the development build is not optimized.
To create a production build, use npm run build.

bash-3.2$ pwd 
pwd 
/Users/jeromesimeon/git/gold/concerto-ui
bash-3.2$ 

I see the following in the demo:

Screenshot 2020-02-20 at 3 31 44 PM

@jeromesimeon jeromesimeon added the bug Something isn't working label Feb 20, 2020
@jeromesimeon
Copy link
Member Author

This might have been inadvertently introduced by switching to the latest version of concerto when fixing this? 6c786be

@jeromesimeon
Copy link
Member Author

jeromesimeon commented Feb 21, 2020

Works again with PR #30

Screenshot 2020-02-20 at 7 27 58 PM

@jeromesimeon
Copy link
Member Author

Works for me now. Reopen if any issues.

@discochance
Copy link

I'm having Problems with concerto-ui v0.82.9 until 0.83.0 in which the production build crashes with a "cannot call a class as function" error.

It happens when I import FormGenerator or ConcertoForm.

Development build compiles fine without any notices.

Screenshot of Error

@jeromesimeon
Copy link
Member Author

jeromesimeon commented Feb 22, 2020

@discochance how is that different from this issue. Is the demo still not working for version 0.83?

@discochance
Copy link

I'm not running the demo, but I'll set it up to test.
And yes, in my project, the problem persisted even in 0.83.

I'll report shortly whether the demo is working for me.

@discochance
Copy link

Running the demo in a blank docker seems to work for me.
Still my own package which depends on @accordproject/concerto-ui-react 0.83 and uses ConcertoForm crashes, as I mentioned only in production mode.

@discochance
Copy link

Could it be connected to the way I build the production build? In my case I'm using a docker container running npm run build and copying the output files to an nginx environment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants