0

I'm using the skeleton-typescript aurelia skeleton-navigation package, when running gulp bundle it gives me an error that says path must be a string but was undefined

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.basename (path.js:801:5)
    at exports.writeOutputs (C:\Users\joaoe\Desktop\skeleton-navigation\skeleton-typescript\node_modules\systemjs-builder\lib\output.js:137:23)
    at C:\Users\joaoe\Desktop\skeleton-navigation\skeleton-typescript\node_modules\systemjs-builder\lib\builder.js:575:14
    at tryCatcher (C:\Users\joaoe\Desktop\skeleton-navigation\skeleton-typescript\node_modules\systemjs-builder\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\joaoe\Desktop\skeleton-navigation\skeleton-typescript\node_modules\systemjs-builder\node_modules\bluebird\js\release\promise.js:502:31)

All gulp related files can be found here since there are more than one.

Even the cloned package throw that.

I'm running Node 6.0.0 and tested with 5.9.1, on Windows 10.

There is some property that I need set to be that path ? Seems related to Aurelia pre built tasks, from comments could also be an environment problem.

Joao Evangelista
  • 2,407
  • 2
  • 26
  • 37
  • 1
    I've just downloaded the latest skeleton-typescript. The `gulp bundle` is working fine. Are you sure that all npm and jspm packages have been installed? – Fabio Apr 27 '16 at 16:22
  • Make sure you are using an updated version of npm. You can see this running `npm -v`. The version must be something greater than 3 – Fabio Apr 27 '16 at 16:27
  • Now I see a `MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".` when doing `npm install` .I'll try to find that .net package – Joao Evangelista Apr 27 '16 at 16:35
  • Possible duplicate of [Gulp-useref is throwing error: "path must be a string"](http://stackoverflow.com/questions/23350835/gulp-useref-is-throwing-error-path-must-be-a-string) – Smandoli Apr 27 '16 at 16:35

1 Answers1

1

As I tracked it down, the issues seems to be an ugly combination of node-gyp, Windows and node 6

So install all dependencies needed for node-gyp, following your OS steps as seen at official repo. Unfortunately for now if you are running Windows is likely that you need to install Visual Studio. Then run npm install on the repository and see if there is any error, should be no one now. Then try to gulp bundle it should work now. With downgraded node to 5.11 I was able to run again, I did not test with node 6 but feel free to try.

Joao Evangelista
  • 2,407
  • 2
  • 26
  • 37