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

does not match the corresponding path on disk Leaflet.js #13

Closed
harunkelesoglu opened this issue Nov 15, 2018 · 3 comments
Closed

does not match the corresponding path on disk Leaflet.js #13

harunkelesoglu opened this issue Nov 15, 2018 · 3 comments

Comments

@harunkelesoglu
Copy link

harunkelesoglu commented Nov 15, 2018

Hi,
I am trying use this library on react.But i get error the following error:

Module not found: `/Users/admin/Projects/DashboardBootstrap/node_modules/leaflet/src/leaflet.js` does not match the corresponding path on disk `Leaflet.js`.

I've detected the cause of the error. echarts-leaflet is imported from leaflet library as leaft/src/leaflet if you can update to echarts-leaflet.js file as follows it is fixed this error for react-scripts.

  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts/lib/echarts'), require('leaflet/src/Leaflet')) :
@Poyoman39
Copy link
Contributor

You can run npm i https://github.com/Poyoman39/echarts-leaflet.gitif you can't wait the pull request to be merged

@harunkelesoglu
Copy link
Author

harunkelesoglu commented Nov 17, 2018

Thanks @Poyoman39 . I done it different way. I wrote npm scripts and then added build and start.

"scripts": {
    "build-css": "node-sass-chokidar --include-path ./src --incle-path ./node_modules src/ -o src/",
    "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
    "start-js": "react-scripts start",
    "start": "npm run fixed && npm-run-all -p watch-css start-js",
    "fixed":"mv ./node_modules/leaflet/src/Leaflet.js ./node_modules/leaflet/src/leaflet.js",
    "build": "npm run build-css && npm run fixed && REACT_APP_ENV=production react-scripts build"
  }

gnijuohz pushed a commit that referenced this issue Nov 18, 2018
* Fix issue 13
@gnijuohz
Copy link
Owner

@harunkelesoglu @Poyoman39 's change has been merged I'll release a new version of this library soon. Thanks for reporting this issue!

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

No branches or pull requests

3 participants