Comments (7)
@johnsoncodehk, source mappings have been removed in prerelease version v2.0.0-alpha.2.
If this does not fix the issue, please reopen.
from protobuf-ts.
The fix has been back-ported in v1.0.12
from protobuf-ts.
Thanks for the feedback, @johnsoncodehk
I did a npm install @protobuf-ts/runtime
in a fresh new project and had a look at the contents of node_modules/@protobuf-ts/runtime/
.
(I removed all source files except "assert") just to make it a bit easier.
Looking at build/commonjs/assert.js
:
// code omitted
//# sourceMappingURL=assert.js.map
build/es2015/assert.js
:
// code omitted
//# sourceMappingURL=assert.js.map
build/types/assert.d.ts
:
// declarations omitted
//# sourceMappingURL=assert.d.ts.map
All files referenced by sourceMappingURL
exist. The mapping files look very similar. This is build/commonjs/assert.js.map
:
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../../src/assert.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,MAAM,CAAC,SAAc,EAAE,GAAY;IAC/C,IAAI,CAAC,SAAS,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB;AACL,CAAC;AAJD,wBAIC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,KAAY,EAAE,GAAY;IAClD,MAAM,IAAI,KAAK,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,qBAAqB,GAAG,KAAK,CAAC,CAAC;AAC1D,CAAC;AAFD,kCAEC;AAGD,MACI,WAAW,GAAI,sBAAsB,EACrC,WAAW,GAAG,CAAC,sBAAsB,EACrC,UAAU,GAAG,UAAU,EACvB,SAAS,GAAG,UAAU,EACtB,SAAS,GAAG,CAAC,UAAU,CAAC;AAG5B,SAAgB,WAAW,CAAC,GAAQ;IAChC,IAAI,OAAO,GAAG,KAAK,QAAQ;QACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,OAAO,GAAG,CAAC,CAAC;IACrD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,SAAS,IAAI,GAAG,GAAG,SAAS;QAC5D,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,GAAG,CAAC,CAAC;AAClD,CAAC;AALD,kCAKC;AAED,SAAgB,YAAY,CAAC,GAAQ;IACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;QACvB,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,OAAO,GAAG,CAAC,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,UAAU,IAAI,GAAG,GAAG,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,GAAG,CAAC,CAAC;AACnD,CAAC;AALD,oCAKC;AAED,SAAgB,aAAa,CAAC,GAAQ;IAClC,IAAI,OAAO,GAAG,KAAK,QAAQ;QACvB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,OAAO,GAAG,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QACrB,OAAO;IACX,IAAI,GAAG,GAAG,WAAW,IAAI,GAAG,GAAG,WAAW;QACtC,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,GAAG,CAAC,CAAC;AACpD,CAAC;AAPD,sCAOC"}
So the problem seems to be ../../src/assert.ts
. This path simply does not exists in the published package...
Could you verify if your error goes away if you add the .ts source files?
You can download them from here: https://github.com/timostamm/protobuf-ts/tree/v1.x/packages/runtime/src (note the v1.x branch)
Then place the ts files in your node_modules/@protobuf-ts/runtime/src/
directory.
If this fixes your error, I will add the files to the published packages.
from protobuf-ts.
Yes current release version have .map
files, but I see you have added .js.map
in .gitignore
:
so I guess .map
will remove in next version, maybe I'm wrong.
I already remove .map
and //# sourceMappingURL=
in my local node_modules to remove errors, so you don't need to publish version for me now :).
Yes if you add .ts
files to npm release can resolve this problem, but I think disable sourceMap for publish build is better, hope it can fix in next version.
And thanks you work again!
from protobuf-ts.
I see you have added
.js.map
in.gitignore
Yes, but there also is a .npmignore. This means .gitignore does not matter for npm publish.
I think disable sourceMap for publish build is better
Seems like there is no definite answer, see googleapis/google-cloud-node#2867 for example.
But I think I prefer removing source maps instead of adding typescript sources. I'll give it some more thought. Let's keep this issue open as a reminder.
from protobuf-ts.
Yes I think removing source maps is better too! (may be some misunderstanding before)
from protobuf-ts.
I already using 2.x, thanks!
from protobuf-ts.
Related Issues (20)
- Is this compiling error could be turned off by Typescript or Option in protobuf-ts HOT 2
- 2.9.2 not working with 'exactOptionalPropertyTypes: true' HOT 1
- Release 2.9.3 breaks serialization for me HOT 6
- Generated message classes cannot be subclassed because of missing 'export' HOT 1
- Error decoding from binary: "cant skip wire type 4" HOT 1
- How to debug INVALID_ARGUMENT? HOT 1
- Missing headers on RPCError HOT 8
- rpcError cannot support Chinese
- [Request] Flag to handle google wrapper types HOT 1
- Vite cannot found module HOT 2
- Invalid typescript in descriptor.ts HOT 2
- Can't retry request after awaiting response HOT 2
- Typesafe API to retrieve enums from strings HOT 4
- `output_javascript` no longer emits `.d.ts` files HOT 6
- Request: Support for moduleResolution "nodenext" and "node16" HOT 2
- Fails to download v27.0-rc1 (which was just released) HOT 7
- invalid url for latest v27.0-rc1 release HOT 1
- Object generated by protobuf-ts seems not support TWO-WAY binding in vue. HOT 5
- Support for WebTransport/HTTP3 HOT 1
- RPC Output Stream drops data if `AsyncIterator` isn't invoked before response is received
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-ts.