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

Publish source directory for bam-js for source-map #90

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Conversation

cmdcolin
Copy link
Collaborator

Currently use with webpack 5 gives many errors for source map not found

e.g.

WARNING in ../../node_modules/@gmod/bam/esm/bai.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/bai.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/bai.ts'
 @ ../../node_modules/@gmod/bam/esm/index.js 1:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/bamFile.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/bamFile.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/bamFile.ts'
 @ ../../node_modules/@gmod/bam/esm/index.js 3:0-32 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/chunk.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/chunk.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/chunk.ts'
 @ ../../node_modules/@gmod/bam/esm/bai.js 3:0-28 95:28-33 216:28-33
 @ ../../node_modules/@gmod/bam/esm/index.js 1:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/constants.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/constants.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/constants.ts'
 @ ../../node_modules/@gmod/bam/esm/record.js 2:0-36 406:27-48 412:27-53 418:27-47 424:27-48 430:27-49 436:27-50 442:27-47 448:27-47 454:27-51 460:27-48 466:27-45 472:27-55
 @ ../../node_modules/@gmod/bam/esm/index.js 5:0-33 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/csi.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/csi.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/csi.ts'
 @ ../../node_modules/@gmod/bam/esm/index.js 2:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/htsget.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/htsget.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/htsget.ts'
 @ ../../node_modules/@gmod/bam/esm/index.js 4:0-34 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/index.ts'
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/indexFile.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/indexFile.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/indexFile.ts'
 @ ../../node_modules/@gmod/bam/esm/bai.js 4:0-36 16:33-42
 @ ../../node_modules/@gmod/bam/esm/index.js 1:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/record.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/record.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/record.ts'
 @ ../../node_modules/@gmod/bam/esm/index.js 5:0-33 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/sam.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/sam.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/sam.ts'
 @ ../../node_modules/@gmod/bam/esm/bamFile.js 11:0-40 174:11-26
 @ ../../node_modules/@gmod/bam/esm/index.js 3:0-32 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/util.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/util.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/util.ts'
 @ ../../node_modules/@gmod/bam/esm/bai.js 5:0-54 18:22-34 239:11-25
 @ ../../node_modules/@gmod/bam/esm/index.js 1:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

WARNING in ../../node_modules/@gmod/bam/esm/virtualOffset.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/virtualOffset.ts' file: Error: ENOENT: no such file or directory, open '/home/cdiesh/src/jbrowse-components/node_modules/@gmod/bam/src/virtualOffset.ts'
 @ ../../node_modules/@gmod/bam/esm/bai.js 2:0-44 89:22-31 90:22-31 110:25-34
 @ ../../node_modules/@gmod/bam/esm/index.js 1:0-24 6:0-52
 @ ../../plugins/alignments/dist/BamAdapter/BamAdapter.js 3:0-36 19:22-29
 @ ../../plugins/alignments/dist/BamAdapter/index.js 9:27-49
 @ ../../plugins/alignments/dist/index.js 6:0-40 27:5-17
 @ ./src/corePlugins.ts 3:0-52 31:44-54
 @ ./src/Loader.tsx 22:0-40 350:52-67
 @ ./src/index.tsx 8:42-60

I think adding the src directory to the deployed package can help

Xref mswjs/msw#1030

@cmdcolin
Copy link
Collaborator Author

this will need to be done for most of our modules

@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #90 (74fc731) into master (cc597f9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   82.13%   82.13%           
=======================================
  Files          13       13           
  Lines        1086     1086           
  Branches      225      225           
=======================================
  Hits          892      892           
  Misses        194      194           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc597f9...74fc731. Read the comment docs.

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

Successfully merging this pull request may close these issues.

1 participant