danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault'

Open cavillo opened this issue 5 years ago • 1 comments

Following installation steps for node:

npm install danfojs-node --save

I got the following error:

→ $ node index.js 
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/test/node_modules/danfojs-node/dist/index.js:3:30)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Tested with:

  • danfojs-node "^0.2.0"
  • node version v10.21.0 and npm version 6.14.4
  • node version v14.15.5 and npm version 6.14.11 and got the same result.

This gets solved by adding the dependency @babel/runtime

npm install @babel/runtime --save-dev

Is this an additional step for the installation or is it missing in the dependencies?

cavillo avatar Feb 13 '21 23:02 cavillo

@cavillo Thanks for raising this issue. This has been fixed in the latest version 0.2.2. Please install and try it out.

risenW avatar Feb 14 '21 15:02 risenW