Skip to content
This repository has been archived by the owner on Aug 11, 2019. It is now read-only.

Cannot compile due to error: TypeError: path must be a string or Buffer in binding.stat(pathModule._makeLong(path)); #27

Open
louwers opened this issue Oct 27, 2017 · 1 comment

Comments

@louwers
Copy link

louwers commented Oct 27, 2017

A fresh installation of svelte-cli fails to compile anything.

Stack trace
$ svelte compile --iife ./HelloWorld.html > HelloWorld.js
svelte version 1.41.1
fs.js:955
  binding.stat(pathModule._makeLong(path));
          ^

TypeError: path must be a string or Buffer
    at Object.fs.statSync (fs.js:955:11)
    at compile$1 (/home/me/.node_modules/lib/node_modules/svelte-cli/bin.js:559:19)
    at Object.<anonymous> (/home/me/.node_modules/lib/node_modules/svelte-cli/bin.js:707:3)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)

Versions

$ node -v
v8.7.0
$ svelte -v
svelte-cli version 1.4.0
svelte version 1.41.1
@louwers
Copy link
Author

louwers commented Oct 27, 2017

My bad for using a wrong flag... Still that's a very weird error. Adding a check to see if the flag is recognized might be a good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant