Chevrotain / chevrotain

Parser Building Toolkit for JavaScript
https://chevrotain.io
Apache License 2.0
2.44k stars 200 forks source link

missing *.ts source referenced by source maps in sub-packages (utils/gast/cst-dts-gen) #1773

Closed ajnozari closed 11 months ago

ajnozari commented 2 years ago

There seems to be a regression that is causing this to break when using the three-stdlib VRMLoader.

Screen Shot 2022-02-27 at 1 24 52 PM

I'm not really sure if this is an issue with this package or three-stdlib, however this is definitely an issue.

bd82 commented 2 years ago

The source maps appears to be present in the npmjs package.

Which version of Chevrotain is being used in the scenario with the exception stack?

ajnozari commented 2 years ago

chevrotain@9.1.0

It is being included by three-stdlib and they are stating it cannot be fixed by them. Perhaps they need to bump the version in their package.json?

bd82 commented 2 years ago

Probably need to update version.

The source maps appear to be missing in @chevrotain/utils 9.10

But they exist in the latest version

bd82 commented 2 years ago

Looks like this was fixed in this commit

ajnozari commented 2 years ago

TY, I’ll make a PR to bump the three-Stdlib version!

ChrisCrossCrash commented 2 years ago

(Sorry, I posted this on my duplicate issue #1775 first. Now it should be in the right spot.)

@bd82 I'm afraid that I'm still having a similar issue, even after this PR was merged into pmndrs/three-stdlib: https://github.com/pmndrs/three-stdlib/issues/133.

Here's a commit to my project which still has warnings after executing yarn start.

It looks like now the sourcemaps are included with the NPM package, but their corresponding TypeScript files are not.

If you look at the bottom of @chevrotain/cst-dts-gen/lib/src/api.js, you'll notice the comment //# sourceMappingURL=api.js.map, telling where to find the source map.

If you open api.js.map, you'll see this:

{
  "sources":["../../src/api.ts"]
  ...
}

That file doesn't exist in the NPM package, hence the warning.

So I think the problem needs to be solved by one of the following:

Here are the warnings:

Compiled with warnings.

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/api.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/generate.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/generate.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/model.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/model.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/api.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/helpers.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/helpers.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/model.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/model.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/visitor.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/visitor.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/api.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/print.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/print.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/timer.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/timer.ts'

Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/to-fast-properties.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/to-fast-properties.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

asset static/js/bundle.js 3.58 MiB [emitted] (name: main) 1 related asset
asset index.html 1.33 KiB [emitted]
asset asset-manifest.json 190 bytes [emitted]
cached modules 8.74 MiB [cached] 899 modules
runtime modules 28.3 KiB 14 modules

WARNING in ./node_modules/@chevrotain/cst-dts-gen/lib/src/api.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/api.ts'
 @ ./node_modules/chevrotain/lib/src/api.js 234:20-54
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/generate.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/generate.ts'
 @ ./node_modules/@chevrotain/cst-dts-gen/lib/src/api.js 24:17-38
 @ ./node_modules/chevrotain/lib/src/api.js 234:20-54
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/cst-dts-gen/lib/src/model.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/model.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/cst-dts-gen/src/model.ts'
 @ ./node_modules/@chevrotain/cst-dts-gen/lib/src/api.js 22:14-32
 @ ./node_modules/chevrotain/lib/src/api.js 234:20-54
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/gast/lib/src/api.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/api.ts'
 @ ./node_modules/chevrotain/lib/src/api.js 150:13-40 213:13-40
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/gast/lib/src/helpers.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/helpers.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/helpers.ts'
 @ ./node_modules/@chevrotain/gast/lib/src/api.js 92:16-36
 @ ./node_modules/chevrotain/lib/src/api.js 150:13-40 213:13-40
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/gast/lib/src/model.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/model.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/model.ts'
 @ ./node_modules/@chevrotain/gast/lib/src/api.js 8:14-32
 @ ./node_modules/chevrotain/lib/src/api.js 150:13-40 213:13-40
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/gast/lib/src/visitor.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/visitor.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/gast/src/visitor.ts'
 @ ./node_modules/@chevrotain/gast/lib/src/api.js 83:16-36
 @ ./node_modules/chevrotain/lib/src/api.js 150:13-40 213:13-40
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/utils/lib/src/api.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/api.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/api.ts'
 @ ./node_modules/chevrotain/lib/src/scan/lexer_public.js 42:14-42
 @ ./node_modules/chevrotain/lib/src/api.js 45:21-51
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/utils/lib/src/print.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/print.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/print.ts'
 @ ./node_modules/@chevrotain/utils/lib/src/api.js 8:14-32
 @ ./node_modules/chevrotain/lib/src/scan/lexer_public.js 42:14-42
 @ ./node_modules/chevrotain/lib/src/api.js 45:21-51
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/utils/lib/src/timer.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/timer.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/timer.ts'
 @ ./node_modules/@chevrotain/utils/lib/src/api.js 23:14-32
 @ ./node_modules/chevrotain/lib/src/scan/lexer_public.js 42:14-42
 @ ./node_modules/chevrotain/lib/src/api.js 45:21-51
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

WARNING in ./node_modules/@chevrotain/utils/lib/src/to-fast-properties.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/to-fast-properties.ts' file: Error: ENOENT: no such file or directory, open '/home/ck/projects/depth-section-example/node_modules/@chevrotain/utils/src/to-fast-properties.ts'
 @ ./node_modules/@chevrotain/utils/lib/src/api.js 32:27-58
 @ ./node_modules/chevrotain/lib/src/scan/lexer_public.js 42:14-42
 @ ./node_modules/chevrotain/lib/src/api.js 45:21-51
 @ ./node_modules/chevrotain/lib_esm/api_esm.mjs 1:0-36 2:15-18 3:27-42 4:27-42 5:25-38 6:25-38 7:19-26 8:34-56 9:37-62 10:27-42 11:21-30 12:40-68 13:40-68 14:36-60 15:27-42 16:42-72 17:22-32 18:22-32 19:41-70 20:26-40 21:35-58 22:48-84 23:39-66 24:20-28 25:24-36 26:23-34 27:26-40 28:40-68 29:27-42 30:35-58 31:41-70 32:42-72 33:30-48 34:38-64 35:32-52 36:35-58 37:26-40 38:28-44 39:25-38
 @ ./node_modules/three-stdlib/loaders/VRMLLoader.js 2:0-59 58:30-41 62:25-36 80:22-33 85:23-34 90:18-29 95:18-29 100:20-31 105:17-28 111:28-39 115:25-36 119:28-39 123:26-37 127:27-38 131:26-37 135:22-33 139:22-33 143:21-32 147:21-32 151:22-33 154:15-28 158:25-36 161:15-28 2382:21-26 2398:25-34
 @ ./node_modules/three-stdlib/index.js 273:0-53 273:0-53
 @ ./node_modules/@react-three/drei/web/Select.js 4:0-44 49:23-35
 @ ./node_modules/@react-three/drei/index.js 7:0-52 7:0-52 7:0-52
 @ ./src/App.tsx 9:0-40 28:36-39
 @ ./src/index.tsx 7:0-24 10:33-36

11 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.69.1 compiled with 11 warnings in 2820 ms
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.
bd82 commented 2 years ago

Thanks for the detailed information @ChrisCrossCrash 👍

I'll have a look at adding the missing files (maybe this weekend...)

ChrisCrossCrash commented 2 years ago

That's great! Thanks so much for your work on this project :)

bd82 commented 2 years ago

Please try version 10.1.2 it should have the needed fixes

ChrisCrossCrash commented 2 years ago

@bd82 Seems to be working great!

In case you are wondering how it checked it:

  1. Switch to the commit I referred to in my last comment.
  2. Delete the yarn.lock file. This causes the sub-dependency versions to be re-evaluated on install.
  3. yarn install
  4. Check the yarn.lock file to make sure the project is using Chevrotain 10.1.2
  5. Execute yarn start. There are no warnings anymore.

Thanks a lot for fixing this issue!

bd82 commented 2 years ago

Good to hear it is working correctly now @ChrisCrossCrash 😄

discosultan commented 2 years ago

Thank you for the fix! Can confirm it works.

lsq-ahaseeb commented 11 months ago

@bd82 source maps are missing in v11.0.1 again, FYI.

bd82 commented 11 months ago

source maps are missing in v11.0.1 again, FYI.

Hello @lsq-ahaseeb

The cause is a bit convoluted due to issues with TypeScript + ESM (moduleResolution = "nodeNext"). Which caused me to to exclude *.ts files in many of the packages thus making the source maps irrelevant.

I wonder if I can include .ts files but not `.d.ts`in an npm package. That should provide a clean solution

bd82 commented 11 months ago

Reproduced the problem with tsc --traceResolution

Loading module '@chevrotain/regexp-to-ast' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration.
Directory '/Users/foo/workspace/chevrotain/packages/chevrotain/src/scan/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'chevrotain__regexp-to-ast'
Directory '/Users/foo/workspace/chevrotain/packages/chevrotain/src/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'chevrotain__regexp-to-ast'
Found 'package.json' at '/Users/foo/workspace/chevrotain/packages/chevrotain/node_modules/@chevrotain/regexp-to-ast/package.json'.
Entering conditional exports.
Matched 'exports' condition 'import'.
Using 'exports' subpath '.' with target './lib/src/api.js'.
File name '/Users/foo/workspace/chevrotain/packages/chevrotain/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js' has a '.js' extension - stripping it.
File '/Users/foo/workspace/chevrotain/packages/chevrotain/node_modules/@chevrotain/regexp-to-ast/lib/src/api.ts' does not exist.
File '/Users/foo/workspace/chevrotain/packages/chevrotain/node_modules/@chevrotain/regexp-to-ast/lib/src/api.tsx' does not exist.
File '/Users/foo/workspace/chevrotain/packages/chevrotain/node_modules/@chevrotain/regexp-to-ast/lib/src/api.d.ts' exists - use it as a name resolution result.

Basically a foo.d.ts file next to foo.ts is given priority above that of the root types property.

bd82 commented 11 months ago

Hmm this is seems easy to fix, I must have removed too many things when I tried to avoid the tsc + esm compile issue.

https://github.com/Chevrotain/chevrotain/commit/ea3a55b7f11151e32027210133e86f5998cf25eb

bd82 commented 11 months ago

Try 11.0.2, source maps are back 😄

image