jspm / generator

JSPM Import Map Generator
Apache License 2.0
166 stars 21 forks source link

MODULE_NOT_FOUND error #123

Closed zachsa closed 2 years ago

zachsa commented 2 years ago

MODULE_NOT_FOUND error while generating import map

Please let me know if this is enough information, or what else I can provide. I think this is related to node std lib

file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1594
                throw new JspmError(`Module not found: ${resolvedUrl}${importedFrom(parentUrl)}`, 'MODULE_NOT_FOUND');
                      ^

JspmError: Module not found: https://ga.jspm.io/npm:object-inspect@1.12.0/util.inspect.js imported from https://ga.jspm.io/npm:object-inspect@1.12.0/index.js
    at Resolver.analyze (file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1594:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async TraceMap.traceUrl (file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1962:71)
    at async TraceMap.trace (file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1931:13)
    at async file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1992:30
    at async Promise.all (index 0)
    at async TraceMap.traceUrl (file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1987:9)
    at async TraceMap.trace (file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1942:13)
    at async file:///home/zach/code/saeon/repositories/somisana/web/node_modules/@jspm/generator/dist/generator.js:1992:30
    at async Promise.all (index 2) {
  jspmError: true,
  code: 'MODULE_NOT_FOUND'
}

This occurs with the following import:

import { ApolloServer } from 'apollo-server-koa'
zachsa commented 2 years ago

My current workaround for this is to pass ignore: ['apollo-server-koa'] to the generator

guybedford commented 2 years ago

Thanks for posting the bug report. This should be fixed in https://github.com/jspm/generator/pull/124 now, with the release to follow soon.