Closed jmoreno127 closed 3 years ago
@jmoreno127 are you able to resolve this issue as I am getting the same error on my end?
@jmoreno127 are you able to resolve this issue as I am getting the same error on my end?
No, Ali. I have not been able to. There is no enough information on the internet, according to my research.
@malihassan20 thanks for reporting this! Are you following this tutorial? If so, which section caused the error?
Which version of dash
are you currently using? you can get it with pip show dash
There's a known issue with the npm scripts being outdated, and I submitted to a PR to correct it on dash-docs. The following scripts:
npm run build:js
npm run build:js-dev
npm run build:py
npm run build:all
have been replaced with those:
npm run build:js
npm run build:py_and_r
npm run build
(js-dev was removed).
Thanks for your answer @xhlulu! Indeed, I am following that tutorial.
The error is generated when executing that line: cookiecutter https://github.com/plotly/dash-component-boilerplate.git
Everything looks fine until the following line:
Executing: npm run build:js
@xhlulu yes I am following the same tutorial. The error occurs same as above which @jmoreno127 have mentioned
I use it all the time inside WSL 2.0 and Ubuntu 20.04 with varying versions of Python and didn't run into that error. So I tried running it with a Windows 10 machine and the following configs:
Python 3.9
pip 20.2.3
npm 6.14.10
node v14.15.4
I entered the following options:
All the python packages were installed correctly:
npm install
worked as intended:
npm run build:js
also didn't throw any error:
@jmoreno127 @malihassan20 Here's a few more things you can try:
If none of the above worked, can you paste the entire output of your console?
@xhlulu Thank you for your answer!
I am still getting the error.
I am trying to configure it on macOS Big Sur Versio 11.2.1. I am using:
Python 3.7.6 pip 21.0.1 Cookiecutter 1.7.2 npm@6.14.9 node@v14.15.5
The error on the console is:
Executing: npm run build:js
> my_own@0.0.1 build:js /Users/jonathanmorenon/OneDrive/Freelance/Data Enigma/D3/dash-react-tutorial/my_own
> webpack --mode production
Hash: 3f4c84016d8a280949d6
Version: webpack 4.36.1
Time: 2804ms
Built at: 02/18/2021 12:55:33 PM
Asset Size Chunks Chunk Names
my_own.min.js 3.15 KiB 0 [emitted] main
my_own.min.js.map 7.34 KiB 0 [emitted] main
Entrypoint main = my_own.min.js my_own.min.js.map
[0] external "PropTypes" 42 bytes {0} [built]
[1] external "React" 42 bytes {0} [built]
[2] ./src/lib/index.js + 1 modules 5 KiB {0} [built]
| ./src/lib/index.js 113 bytes [built]
| + 1 hidden module
Executing: venv/bin/python -m dash.development.component_generator ./src/lib/components my_own -p package-info.json --jl-prefix '' --r-prefix ''
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '/Users/jonathanmorenon/OneDrive/Freelance/Data'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Error generating metadata in my_own (status=1)
post_gen_project command failed: venv/bin/python -m dash.development.component_generator ./src/lib/components my_own -p package-info.json --jl-prefix '' --r-prefix ''
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)`
Can you change your path? Might be that the component generator CLI doesn't like spaces in the path name. Might try:
cd /Users/jonathanmorenon/
mkdir dash_apps
cd dash_apps
cookiecutter gh:plotly/dash-component-boilerplate
That's exactly right! @xhlulu It finally worked! It was for the reason you have mentioned. Thank you so much!
@jmoreno127 Great to hear this!
@malihassan20 Feel free to reopen if the solution above doesn't work for you
Good evening, can you tell me what the problem might be? I tried to install Angular and got the following errors
Hi!
I am getting this error following the tutorial:
I am on a Mac computer with Node v14.15.3, npm 6.14.9, and Python 3.7.6. Also getting the same error with a PC with node V12.10.0, npm 6.10.3, and python 3.8.3.