Sorry, this was a duplicate posting. My bad.
Duplicate link: 
https://groups.google.com/forum/#!topic/protobuf/46NJpIX-kFI 

On Wednesday, June 1, 2016 at 7:48:18 PM UTC+1, Keith Woods wrote:
>
> Hi all
>
> I'm using protoc from the latest beta release (v3.0.0-beta-3) I'm having 
> an issue with the  generated javascript. It's not generating .js files for 
> my 'out of the box' proto imports (i.e. for the include Timestamp type).
>
> Given this .ptoto:
>
> // foo.proto
> syntax = "proto3";
>
> import "google/protobuf/timestamp.proto";
>
> message SomeMessage {
>    google.protobuf.Timestamp someTime = 1;
> }
>
>
> and this command to gen the dtos: 
>
> protoc --proto_path=./ --js_out=import_style=commonjs:./ foo.proto
>
> You end up with a single output foo_pb.js. Inside this file it tries to 
> require the timestamp file which wasn't generated:
>
> /**
>  * @fileoverview
>  * @enhanceable
>  * @public
>  */
> // GENERATED CODE -- DO NOT EDIT!
>
> var jspb = require('google-protobuf');
> var goog = jspb;
> var global = Function('return this')();
>
> *var google_protobuf_timestamp_pb = 
> require('./google/protobuf/timestamp_pb.js');  // NOTE *
> *./google/protobuf/timestamp_pb.js** doesn't exist*
> goog.exportSymbol('proto.SomeMessage', null, global);
>
>
> // ... 
>
> I'm guessing the the npm package google-protobuf 
> <https://www.npmjs.com/package/google-protobuf> should contain these 
> types so the above should read something like this:
>
> require('gooogle-protobuf/builtInTypes/timestamp_pb.js');
>
> OR that protoc should generate timestamp_pb.js on the fly with the rest of 
> the protos.
>
> As a side note I don't see anything like timestamp_pb.js in the repo 
> <https://github.com/google/protobuf/tree/master/js>
>
> Any ideas?
> Is there a way to get protoc to generate timestamp_pb.js?
>
> Any help appreciated, thanks.
>
> Keith
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to