Repository navigation
Description
Hello,
I have been having an issue with the dash component boilerplate not generating my components. When I execute
npm run build
It generates the following error
`Error generating metadata in test_component (status=255)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test_component@0.0.1 build:py_and_r: dash-generate-components ./src/lib/components test_component -p package-info.json --r-prefix ''
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test_component@0.0.1 build:py_and_r script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mabadir\AppData\Roaming\npm-cache_logs\2020-06-15T15_43_13_527Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test_component@0.0.1 build: npm run build:js && npm run build:py_and_r
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test_component@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mabadir\AppData\Roaming\npm-cache_logs\2020-06-15T15_43_13_559Z-debug.log
To test whether this was something that was wrong with my javascript, I ran the cookiecutter command again in a new python project to create a new component. For set up I selected the following
You've downloaded C:\Users\mabadir.cookiecutters\dash-component-boilerplate before. Is it okay to delete and re-download it? [yes]:
project_name [my dash component]: Test Component
project_shortname [test_component]:
component_name [TestComponent]:
r_prefix []:
author_name [Enter your first and last name (For package.json)]: MA
author_email [Enter your email (For package.json)]: ma
github_org []:
description [Project Description]: testing
Select license:
1 - MIT License
2 - BSD License
3 - ISC License
4 - Apache Software License 2.0
5 - GNU General Public License v3
6 - Not open source
Choose from 1, 2, 3, 4, 5, 6 [1]:
publish_on_npm [True]: False
install_dependencies [True]:
Executing: c:\python38\python.exe -m venv venv
From there I tried npm run build on the example javascript component provided, and it still gave me the above error. Can you please advise?
Edit: Forgot to mention that it was working before.
Activity
alexcjohnson commentedon Jun 19, 2020
Thanks @Mark-Abadir - is there any more to the error message than that? Can you describe your environment? I just ran a plain
cookiecutter https://github.com/plotly/dash-component-boilerplate.gitfollowed bynpm run buildon my mac, and it all seemed to work fine, but I could certainly imagine there being platform-specific issues.RobAlonzi commentedon Jun 22, 2020
This happens to me as well, running a brand new
cookiecutter https://github.com/plotly/dash-component-boilerplate.gitfollowed bynpm run buildWebpack seems to be outputting normally:
This seems to error out:
Looks like some JSON is missing? I am running on Ubuntu 18.04.4 LTS
RobAlonzi commentedon Jun 22, 2020
For me, it was a false alarm, I had to make sure I was in the
venvbefore I rannpm run buildIn the project root,
source venv/bin/activate, thennpm run buildworked for me.@Mark-Abadir, I hope this helps you as well.
Mark-Abadir commentedon Jul 13, 2020
Sorry for the delayed response.
@alexcjohnson That is the entire error message. I tried using npm run build with python 2.7 and python 3.8. Same error message both times. Both have dash as part of the included packages.
ch
@RobAlonzi Thanks for the advice but I didn't get that error specifically. And source venv/bin/activate didn't change anything for me
xhluca commentedon Aug 4, 2020
Hi Mark, here's exactly what I did wrote in the terminal (Ubuntu), and I had no error:
I noticed you are running on Windows. Have you tried Windows Subsystem for Linux (WSL) 2.0? If I remember correctly,
source venv/bin/activatedoes not work in a Win10 command prompt, so maybe you have to usevenv\Scripts\activate.batinstead?