i'm trying to install the Javascript Node-CiviCRM package with npm in my Nuxt.js project with no luck. I tried:

npm install civicrm --save

but i have the following issues:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

In fact, as soon as i try to include the library:

const config = {
  server: 'https://my.server.com',
  path: '/httpdocs/wp-content/plugins/civicrm/civicrm/extern/rest.php',
  key: 'key_here',
  api_key: 'api_key_here'
const civi = require('civicrm')(config);

I have the following blocking error:

These dependencies were not found:                                                                                                       friendly-errors 12:34:07
                                                                                                                                         friendly-errors 12:34:07
* fs in ./node_modules/request/lib/har.js                                                                                                friendly-errors 12:34:07
* net in ./node_modules/forever-agent/index.js, ./node_modules/tough-cookie/lib/cookie.js and 1 other                                    friendly-errors 12:34:07
* tls in ./node_modules/forever-agent/index.js, ./node_modules/tunnel-agent/index.js

Installing the dependences doesn't help.

Can you provide any help on this? Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.