accordproject / template-archive

Smart Legal Contracts & Templating System
https://accordproject.org/projects/cicero/
Apache License 2.0
282 stars 119 forks source link

CLI tools fail on node v7 #187

Closed sgabrielle closed 6 years ago

sgabrielle commented 6 years ago

when ever i try to use cicero cli i get a parse token error as seen below

screen shot 2018-08-09 at 9 55 49 am
mttrbrts commented 6 years ago

Thanks @sgwasserman, Unfortunately I'm not able to replicate the same behaviour with the latest (0.5) release.

mattmbp:cicero matt$ npm i -g @accordproject/cicero-server
npm WARN deprecated nomnom@1.6.2: Package no longer supported. Contact support@npmjs.com for more info.
/Users/matt/.nvm/versions/node/v8.11.1/bin/cicero-server -> /Users/matt/.nvm/versions/node/v8.11.1/lib/node_modules/@accordproject/cicero-server/app.js
+ @accordproject/cicero-server@0.5.0
updated 1 package in 3.88s
mattmbp:cicero matt$ export CICERO_DIR=../cicero-template-library/src/
mattmbp:cicero matt$ cicero-server
Server listening on port:  6001

Can you post the output of running the following commands on your machine, please?

npm i -g @accordproject/cicero-server
export CICERO_DIR=<path to your template library>
cicero-server
mttrbrts commented 6 years ago

Resolved by upgrading node to version 8. Guidance for installing prerequisites is in the documentation. https://docs.accordproject.org/docs/accordproject-tools.html#prerequisites

Each of the cicero npm packages (cicero-cli, cicero-server etc) contains an engines declaration which declares that the package will only work on node versions > 8.x, https://github.com/accordproject/cicero/blob/2c1a46b270c3f3d433c003166d5a166f4a078728/packages/cicero-server/package.json#L6

However, this declaration is only advisory, and can no longer be enforced by npm (since v3), https://docs.npmjs.com/files/package.json#enginestrict.

Closing this issue as npm doesn't have a simple way to enforce this for now.