SVG-Edit / svg-edit-react

React based editor based on SVG-edit svgcanvas
MIT License
71 stars 24 forks source link

Fix start script to use http.server module for Python 3 compatibility #6

Closed sabeerbikba closed 3 months ago

sabeerbikba commented 3 months ago

Description:

The current start script in package.json uses the SimpleHTTPServer module, which is only available in Python 2. This causes the server to fail on systems with Python 3, resulting in an error. This pull request updates the start script to use the http.server module, which is the Python 3 equivalent, ensuring compatibility and resolving the issue.

Error Before Change:


> @svg-edit/svgedit-react@0.1.0 start /home/kali/code/extra/svg-edit-react-test
> python -m SimpleHTTPServer

/usr/bin/python: No module named SimpleHTTPServer

 ELIFECYCLE  Command failed with exit code 1.

Changes made:

Example:

Before:


"scripts": {
  "start": "python -m SimpleHTTPServer"
}

After:


"scripts": {
  "start": "python -m http.server"
}

Impact:

This change will ensure the development server starts correctly on systems with Python 3, providing a smoother development experience.