mikeedwards / po2json

Pure Javascript implementation of Uniforum message translation. Based on a great gist.
https://gist.github.com/1739769
Other
178 stars 62 forks source link

Invalid 'main' key #103

Open gtsop-pf opened 3 years ago

gtsop-pf commented 3 years ago

Expected Behavior

Simply run the program

Actual Behavior

Gor error for invalid 'main' key in package.json

Steps to Reproduce

po2json input.po outpuit.po

Additional Data

Can you please make a new release containing this latest fix? https://github.com/mikeedwards/po2json/commit/51e2310485bbe35e9e57f2eee238185459ca0eab

creage commented 2 years ago

@mikeedwards could you help us please with this?

creage commented 2 years ago

We can also use patch-package, but still...

HarelM commented 2 years ago

Can a new version be released please? I have this warning as well...

riteshjagga commented 2 years ago

This issue happened when we wanted to upgrade Node 14 to Node 16.

The package.json field needs an update for the main field to have it working correctly with Node 16 as per this deprecation but until that happens, one can follow a workaround as explained here.

Before:

const childProcess = exec(`./node_modules/.bin/po2json app.po app.json --format=\'jed1.x\' -p`)

After:

const childProcess = exec(`node --no-deprecation ./node_modules/.bin/po2json app.po app.json --format=\'jed1.x\' -p`)

The above code is from the gulp file but it works if you run this command in the terminal too.