2

After installing harp by their tutorial I can't create default template from the second tutorial. On running harp init anyname I get

fs.js:924
  return binding.readdir(pathModule.toNamespacedPath(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir '/Users/vladyslavzavalykhatko/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/vendor'
    at Object.fs.readdirSync (fs.js:924:18)
    at Object.getInstalledBinaries (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/extensions.js:128:13)
    at foundBinariesList (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (path/.nvm/versions/node/v9.5.0/lib/node_modules/harp/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)

What is the issue?

Vladyslav Zavalykhatko
  • 15,202
  • 8
  • 65
  • 100

1 Answers1

3

Typical error assembling packages, without proper checking for dependencies that are being used.

In this case, node-sass is used somewhere, while the package isn't referenced as a direct dependency.

You should raise it as an issue against the main package, and in the meantime you can work-around the issue by installing node-sass globally:

$ npm i -g node-sass

And sometimes it can be either a permission issue, or you simply need to do a clean install. Check out this issue for details.

vitaly-t
  • 24,279
  • 15
  • 116
  • 138