superset
superset copied to clipboard
Module not found: Error: Can't resolve 'currencyformatter.js'
A clear and concise description of what the bug is. I am getting module not found error, when running without docker, setting up backend and frontend as mentioned in contributing.md.
How to reproduce the bug
- Local setup using contibuting.md, Running superset using proxy server followed instructions on contibuting.md. ,
- After setting up reverse proxy server, i tried to run npm run dev-server
- I got the above error with black screen. After closing this the project is working as expected, but on refresh the error shows up again.
- See error
Expected results
what you expected to happen. It must run without showing black screen full of error.
Actual results
what actually happens. It shows black screen.
Screenshots
If applicable, add screenshots to help explain your problem. Added above
Environment
(please complete the following information):
- browser type and version: Chrome Version 106.0.5249.119
- superset version:
superset version
Superset 0.0.0-dev - python version:
python --version
Python 3.9.7 - node.js version:
node -v
v16.17.0 (npm v8.15.0) - any feature flags active:
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ yes] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ yes] I have reproduced the issue with at least the latest released version of superset.
- [yes ] I have checked the issue tracker for the same issue and I haven't found one similar.
Additional context
Add any other context about the problem here.
Hi! try to install currencyformatter.js into plugin\plugin-chart-handlebars npm install currencyformatter.js --save
It still happen after installing currencyformatter.js @SamarinDV. Reopening again.

To Fix the issue I goto the same path as error and change currencyFormatter.js to currency-formatter. And the error popup vanish. PATH - ./plugins/plugin-chart-handlebars/node_modules/just-handlebars-helpers/lib/helpers/formatters.js step1: cd superset-frontend/plugins/plugin-chart-handlebars/node_modules/just-handlebars-helpers/lib/helpers/ step2: nano formatter.js step3: change currencyFormatter.js to currency-formatter.js as shown in ss.

npm install currencyformatter.js --save
This works for me. Why is this not added to package.json if it's a required dependency?
Is anyone still facing this? Seems like a trivial problem to open a PR for this, but assuming it's long resolved.
Hi, no this is not resolved yet.
- plugin-chart-handlebars is missing dependency "currencyformatter.js" which is listed as a peer-dependency of "just-handlebars-helpers" here https://github.com/leapfrogtechnology/just-handlebars-helpers/blob/main/package.json
- plugin-chart-word-cloud is missing dependency "global-box" as stated here https://www.npmjs.com/package/encodable
I can submit a PR later this week, but I would also like to discuss pinning the dependency versions in the package.json file as this is largely a symptom of inconsistent dependencies.
Actually nevermind, @NishantSinghChandel can you check if you ran npm install
with the legacy-peer-deps flag enabled? It might be in your global NPM config (you can check with npm config ls
). This would cause NPM to skip installing the peer-dependencies, resulting in the runtime errors above.
If you are using Docker for development you need to add voulme for plugin
x-superset-volumes: &superset-volumes
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
- ./docker:/app/docker
- ./superset:/app/superset
- ./superset-frontend:/app/superset-frontend
- /localpath/superset-plugin-chart-hello-world:/app/superset-frontend/plugins/superset-plugin-chart-hello-world
- superset_home:/app/superset_home
- ./tests:/app/tests