Sh: generated/aesprim-browser.js: Permission denied

Hi,

I’m trying to install the FDK, but running into the following error.

Any idea what’s going on?
I have node v10.18.1 and npm 6.13.4

Slims-iMac:fresh slim$ sudo npm install https://dl.freshdev.io/cli/fdk.tgz -g

Password:

npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:

npm WARN deprecated npm i nyc

npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.

npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142

npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

npm WARN deprecated har-validator@5.1.5: this library is no longer supported

/usr/local/bin/fdk -> /usr/local/lib/node_modules/fdk/index.js

> jsonpath@1.0.2 postinstall /usr/local/lib/node_modules/fdk/node_modules/jsonpath

> node lib/aesprim.js > generated/aesprim-browser.js

sh: generated/aesprim-browser.js: Permission denied

npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! jsonpath@1.0.2 postinstall: `node lib/aesprim.js > generated/aesprim-browser.js`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the jsonpath@1.0.2 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/slim/.npm/_logs/2020-11-01T04_25_14_899Z-debug.log

The following solved my problem. This is in case others have something similar happen.

sudo npm install https://dl.freshdev.io/cli/fdk.tgz -g --unsafe-perm=true

Hi Slim,

Welcome to the Developer community :tada:

We advocate installing the npm without sudo as --unsafe-perm may cause security concerns. Can you please try npm install https://dl.freshdev.io/cli/fdk.tgz -g and let us know if it worked?

1 Like