vandium-io / lambda-tester

Helper for unit testing AWS Lambda functions
BSD 3-Clause "New" or "Revised" License
272 stars 51 forks source link

package engines requirement for node v6.x.x is incorrect. #38

Closed stevenao closed 6 years ago

stevenao commented 6 years ago

https://github.com/vandium-io/lambda-tester/blob/master/package.json#L23

Looks like a syntax error there. I am using node v6.13.0 and npm keeps failing saying incompatible node engine version. It works fine only if I switch to node v8.x.x (8.9.0 in my machine).

jimedelstein commented 6 years ago

@stevenao I am encountering the same issue, using node 6.10.x and getting error lambda-tester@3.4.0: The engine "node" is incompatible with this module. Expected version "^6.0.0, ^8.0.0".

I can remove the engine requirement from my package.json to work around this, but it's far from an ideal solution.

stevenao commented 6 years ago

I think in v3.3.0, you had "node": ">=6.0.0 <7.0.0". It looks like your library works for 7.x.x too. Can you use "node": ">=6.0.0 <=8.0.0"?

kaxelson commented 6 years ago

I think the problem here is the comma. You have "node": "^6.0.0, ^8.0.0". If you change to "node": "^6.0.0 || ^8.0.0", it works. FYI, I'm using yarn which uses semver under the covers to validate the range. semver does not work with the comma.

r = new semver.Range('^6.0.0 || ^8.0.0', true) Range { loose: true, raw: '^6.0.0 || ^8.0.0', set: [ [ [Object], [Object] ], [ [Object], [Object] ] ], range: '>=6.0.0 <7.0.0||>=8.0.0 <9.0.0' }

r = new semver.Range('^6.0.0, ^8.0.0', true) Range { loose: true, raw: '^6.0.0, ^8.0.0', set: [ [ [Object], [Object] ] ], range: '>=8.0.0 <9.0.0' }

richardhyatt commented 6 years ago

Resolved in 3.4.1

jimedelstein commented 6 years ago

@richardhyatt doesn't look like official npm registry was updated to 3.4.1