Webpack + @servicestack/client typescript warning

Curious if anyone building with the typescript client notice a webpack warning I get:

WARNING in ../node_modules/@servicestack/client/src/index.js
(Emitted value instead of an instance of Error) Cannot find source file 'index.ts': Error: Can't resolve './index.ts' in 'src\Web\node_modules\@servicestack\client\src'

I have no idea why its trying to find index.ts

Its just a warning but it bothers my build process a little bit to have a warning - I have to keep marking it ignored.

index.ts is no longer deployed with @servicestack/client so you might be using an older version, try installing the latest, e.g:

$ npm i @servicestack/client@latest

Thanks mythz, I do have the latest installed just checked yarn.lock @servicestack/client@^1.0.12

The only place I find the string index.ts in the whole package is index.js.map I’m thinking this is being produced by the source map building process?

Index.js contains:

{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"

perhaps its trying to load up index.ts to build the source map

possibly, I’ve just published a new 1.0.13 of @servicestack/client which doesn’t include index.js.map

I updated to 13 and now see

WARNING in ../node_modules/@servicestack/client/src/index.js
(Emitted value instead of an instance of Error) Cannot find SourceMap 'index.js.map': Error: Can't resolve './index.js.map' in 'src\Web\node_modules\@servicestack\client\src'

I think because index.js contains a source map list at the bottom: //# sourceMappingURL=index.js.map

I’ve published a new 1.0.14 version without sourceMappingURL=index.js.map

1 Like

perfect! build is now clean

1 Like