Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw new TypeError('Path must be a string. Received ' + #1483

Closed
1 task
audreyZyt opened this issue Jan 4, 2018 · 2 comments
Closed
1 task

throw new TypeError('Path must be a string. Received ' + #1483

audreyZyt opened this issue Jan 4, 2018 · 2 comments

Comments

@audreyZyt
Copy link

audreyZyt commented Jan 4, 2018

Issue details

When trying to run browser-sync start --server --directory --files "*", I got this:`

path.js:8
    throw new TypeError('Path must be a string. Received ' +
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:8:11)
    at posix.resolve (path.js:426:5)
    at /usr/local/lib/node_modules/browser-sync/dist/server/static-server.js:26:32
    at updateInDeepMap (/usr/local/lib/node_modules/browser-sync/node_modules/immutable/dist/immutable.js:1973:22)
    at updateInDeepMap (/usr/local/lib/node_modules/browser-sync/node_modules/immutable/dist/immutable.js:1982:23)
    at Map.updateIn (/usr/local/lib/node_modules/browser-sync/node_modules/immutable/dist/immutable.js:1280:26)
    at Map.update (/usr/local/lib/node_modules/browser-sync/node_modules/immutable/dist/immutable.js:1272:14)
    at createServer (/usr/local/lib/node_modules/browser-sync/dist/server/static-server.js:20:10)
    at createServer (/usr/local/lib/node_modules/browser-sync/dist/server/index.js:72:42)
    at module.exports.plugin (/usr/local/lib/node_modules/browser-sync/dist/server/index.js:12:20)

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.23.2 ]
  • Node [ 4.8.7 / 8.9.4]
  • Npm [ 2.15.11 ]

Affected platforms

  • OS High Sierra
@andrericardo
Copy link

Another way to replicate this

package.json.txt

mv package.json.txt package.json
npm install
npm start


> gum@1.0.0 start /Users/andre/workspace/JavaScript30/browser-sync
> browser-sync start --directory --server --files "*.css, *.html, *.js" --https

path.js:28
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'path', 'string');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
    at assertPath (path.js:28:11)
    at resolve (path.js:1179:7)
    at /Users/andre/workspace/JavaScript30/browser-sync/node_modules/browser-sync/dist/server/static-server.js:26:32
    at updateInDeepMap (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/immutable/dist/immutable.js:1973:22)
    at updateInDeepMap (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/immutable/dist/immutable.js:1982:23)
    at Map.updateIn (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/immutable/dist/immutable.js:1280:26)
    at Map.update (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/immutable/dist/immutable.js:1272:14)
    at createServer (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/browser-sync/dist/server/static-server.js:20:10)
    at createServer (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/browser-sync/dist/server/index.js:72:42)
    at module.exports.plugin (/Users/andre/workspace/JavaScript30/browser-sync/node_modules/browser-sync/dist/server/index.js:12:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gum@1.0.0 start: `browser-sync start --directory --server --files "*.css, *.html, *.js" --https`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gum@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andre/.npm/_logs/2018-01-04T21_20_49_741Z-debug.log

@shakyShane
Copy link
Contributor

browser-sync@2.23.3

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

No branches or pull requests

3 participants