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

util.safeProp is not a function #956

Closed
viktorhunko opened this issue Nov 28, 2017 · 4 comments
Closed

util.safeProp is not a function #956

viktorhunko opened this issue Nov 28, 2017 · 4 comments

Comments

@viktorhunko
Copy link

protobuf.js version: 6.8.1

I'm using proto-webpack-plugin with protobuf.js and after recent updates this error occurs: util.safeProp is not a function

proto-webpack-plugin run pbjs like:

pbjs.main(['-t', 'json-module', '-w', 'commonjs', '-o', options.outputFile].concat(files), function(err, output) {
    if (err) { throw err; }
  });
TypeError: util.safeProp is not a function
    at json_module (/node_modules/proto-webpack-plugin/node_modules/protobufjs/cli/targets/json-module.js:12:29)
    at callTarget (/node_modules/proto-webpack-plugin/node_modules/protobufjs/cli/pbjs.js:296:9)
    at Object.main (/node_modules/proto-webpack-plugin/node_modules/protobufjs/cli/pbjs.js:229:13)
    at new ProtoWebpackPlugin (/node_modules/proto-webpack-plugin/index.js:7:8)
    at Object.<anonymous> (/build/webpack.base.conf.js:77:5)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

@dcodeIO
Copy link
Member

dcodeIO commented Nov 29, 2017

Does this fix it for you?

@DenKoren
Copy link

+1 to issue. Commit fixed the problem (at least, no error is thrown after file patching)

@viktorhunko
Copy link
Author

@dcodeIO yep, it works. I will be very grateful if you could update npm
Thanks!

@dcodeIO
Copy link
Member

dcodeIO commented Nov 29, 2017

On npm now as 6.8.3

@dcodeIO dcodeIO closed this as completed Nov 29, 2017
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

No branches or pull requests

3 participants