magjac / graphviz-visual-editor

A web application for interactive visual editing of Graphviz graphs described in the DOT language.
http://magjac.com/graphviz-visual-editor
MIT License
706 stars 74 forks source link

Unable to create generated files using make with parallel job execution #295

Closed nikto-b closed 2 weeks ago

nikto-b commented 2 months ago

Steps to reproduce:

  1. Clone repo
  2. npm install
  3. make
  4. npm run build
    
    Failed to compile.

Module parse failed: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..." You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders Error: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..."

5. npm run start

Failed to compile.

Module parse failed: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..." You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders Error: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..." ERROR in ./src/graphviz-versions.json Module parse failed: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..." You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders Error: Cannot parse JSON: Unexpected token "c" (0x63) in JSON at position 0 while parsing near "const graphvizVersio..." at JsonParser.parse (graphviz-visual-editor/node_modules/webpack/lib/json/JsonParser.js:54:10) at graphviz-visual-editor/node_modules/webpack/lib/NormalModule.js:1235:19 at processResult (graphviz-visual-editor/node_modules/webpack/lib/NormalModule.js:883:11) at graphviz-visual-editor/node_modules/webpack/lib/NormalModule.js:966:5 at graphviz-visual-editor/node_modules/loader-runner/lib/LoaderRunner.js:407:3 at iterateNormalLoaders (graphviz-visual-editor/node_modules/loader-runner/lib/LoaderRunner.js:233:10) at graphviz-visual-editor/node_modules/loader-runner/lib/LoaderRunner.js:224:4 at graphviz-visual-editor/node_modules/webpack/lib/NormalModule.js:920:15 at Array.eval (eval at create (graphviz-visual-editor/node_modules/tapable/lib/HookCodeFactory.js:33:10), :12:1) at runCallbacks (graphviz-visual-editor/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:45:15) at graphviz-visual-editor/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:279:5 at graphviz-visual-editor/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)

webpack compiled with 1 error


First lines of an `src/graphviz-versions.json`:

const graphvizVersion = "11.0.0"; export {graphvizVersion}; standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="62pt" height="44pt" viewBox="0.00 0.00 62.00 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

box

, polygon:<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">