1

With the Immutable-ext installed:

const { List } = require("immutable-ext");

const one = ["one", "two", "three"];
const two = ["one", "four", "five"];

It returns this error:

Error: Cannot find module 'immutable'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\user\Desktop\functional\node_modules\immutable-ext\index.js:1:81)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

Any ideas?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
andres123
  • 25
  • 4

1 Answers1

1

immutable-ext has immutable as a peer dependency. That means you have to install immutable by yourself.

https://npm.github.io/using-pkgs-docs/package-json/types/peerdependencies.html:

NOTE: npm versions 1 and 2 will automatically install peerDependencies if they are not explicitly depended upon higher in the dependency tree. In the next major version of npm (npm@3), this will no longer be the case. You will receive a warning that the peerDependency is not installed instead.

str
  • 42,689
  • 17
  • 109
  • 127