ericalli / static-site-boilerplate

A better workflow for building modern static websites.
http://staticsiteboilerplate.com
MIT License
1.73k stars 165 forks source link

ERR_INVALID_ARG_TYPE on npm start #2

Closed Makanz closed 5 years ago

Makanz commented 5 years ago

Describe the bug Getting error when running npm start

To Reproduce Steps to reproduce the behavior:

  1. npm start

Errormessage

path.js:39
    throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at Object.join (path.js:432:7)
    at Object.<anonymous> (C:\Users\marcus\Desktop\_temp\static-site-boilerplate\config\site.config.js:20:17)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

Versions

trollsyn commented 5 years ago

Did you try using the command npm run start (not just npm start) as the documentation suggests?

Makanz commented 5 years ago

@trollsyn Same error when using npm run start

ericalli commented 5 years ago

This issue has been resolved in the latest release (specifically commit f3ecf7b).

The global path was hardcoded to use process.env.PWD however this isn't compatible with Windows (it returns undefined), instead it should use process.cwd().

Thanks!