Currently, I am utilizing Debian Stable Linux, which is updated and functioning flawlessly.
After globally installing the compute-pcorr package using the following npm command:
$ sudo npm install compute-pcorr -g
The package can be viewed with the command below:
$ npm list -g --depth=0
/usr/local/lib
├── <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="593a3634292c2d3c74293a362b2b196877697769">[email protected]</a>
└── <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7dadb9ac4c3d6c3f78699849984">[email protected]</a>
I am now endeavoring to test a sample code from its official page:
var pcorr = require( '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c6a5a9abb6b3b2a3ebb6a5a9b4b486f7e8f6e8f6">[email protected]</a>' );
var x = [ 1, 2, 3, 4, 5 ];
var y = [ 5, 4, 3, 2, 1 ];
var mat = pcorr( x, y );
Console.log("Correlation Matrix: "+ mat)
Nevertheless, upon running the above code snippet, an error ensues:
$ node compute_pcorr_usage.js
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f1c10120f0a0b1a52">[email protected]</a>'
Furthermore, the following line of code does not yield the desired result:
var pcorr = require( 'compute-pcorr' );
Even after attempting to reinstall the package using this command, the error persists:
sudo npm install compute-pcorr -g --save
The issue lies within the code structure itself. How can this dilemma be addressed?