mirador icon indicating copy to clipboard operation
mirador copied to clipboard

Debugging: Call Stack: non-existent line/column in source

Open jbarth-ubhd opened this issue 3 years ago • 2 comments

Error message: grafik

but... src/lib/AnnotationResource.js line 12 is

  /** */

and max line length in AnnotationResource.js is 96 chars...

jbarth-ubhd avatar Sep 24 '21 11:09 jbarth-ubhd

build:dev does not work...

jb@pers16:~/mirador> npm run build:dev

> [email protected] build:dev /home/jb/mirador
> webpack --mode=development

/home/jb/mirador/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js:219
                  throw createError(
                  ^

Error: [React Refresh] Hot Module Replacement (HMR) is not enabled! React Refresh requires HMR to function
► properly.
    at createError (/home/jb/mirador/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/createError
►.js:7:10)
    at /home/jb/mirador/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js:219:25
    at SyncHook.eval [as call] (eval at create (/home/jb/mirador/node_modules/tapable/lib/HookCodeFactory.js
►:19:10), <anonymous>:11:1)
    at SyncHook.lazyCompileHook (/home/jb/mirador/node_modules/tapable/lib/Hook.js:154:20)
    at NormalModule.createLoaderContext (/home/jb/mirador/node_modules/webpack/lib/NormalModule.js:236:40)
    at NormalModule.doBuild (/home/jb/mirador/node_modules/webpack/lib/NormalModule.js:288:30)
    at NormalModule.build (/home/jb/mirador/node_modules/webpack/lib/NormalModule.js:446:15)
    at Compilation.buildModule (/home/jb/mirador/node_modules/webpack/lib/Compilation.js:739:10)
    at /home/jb/mirador/node_modules/webpack/lib/Compilation.js:981:14
    at /home/jb/mirador/node_modules/webpack/lib/NormalModuleFactory.js:409:6
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:dev: `webpack --mode=development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jb/.npm/_logs/2021-09-24T12_07_29_896Z-debug.log

jbarth-ubhd avatar Sep 24 '21 12:09 jbarth-ubhd

this did not help, too:

diff --git a/package.json b/package.json
index bf3955a6..e8587047 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
     "test:debug": "node --inspect node_modules/.bin/jest -c jest.json --runInBand",
     "test:watch": "jest -c jest.json --watch",
     "build": "NODE_ENV=production webpack --mode=production",
-    "build:dev": "webpack --mode=development",
+    "build:dev": "NODE_ENV=production webpack --mode=development",
     "build:es": "mkdir -p dist/es && cp -r src dist/es && NODE_ENV=production MODULE_FORMAT=es babel dist/es -d dist/es",
     "build:cjs": "mkdir -p dist/cjs && cp -r src dist/cjs && NODE_ENV=production MODULE_FORMAT=cjs babel dist/cjs -d dist/cjs",
     "build:watch": "webpack --watch --mode=development",
diff --git a/webpack.config.js b/webpack.config.js
index 3f78b6ca..96c41629 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -24,12 +24,7 @@ const baseConfig = mode => ({
     ],
   },
   optimization: {
-    minimizer: [
-      new TerserPlugin({
-        extractComments: true,
-        sourceMap: true,
-      }),
-    ],
+    minimize: false,
   },
   output: {
     filename: 'mirador.min.js',

jbarth-ubhd avatar Sep 24 '21 12:09 jbarth-ubhd