Skip to content

pathToRegexp triggers "Missing parameter name" on startup of example code #23

@gischer

Description

@gischer

The example server code is throwing a Syntax error. I cut and pasted the server code into a brand-new Meteor app.

I get the following error:

W20250123-09:46:58.689(-8)? (STDERR) packages/core-runtime.js:189
W20250123-09:46:58.689(-8)? (STDERR)             throw error;
W20250123-09:46:58.689(-8)? (STDERR)             ^
W20250123-09:46:58.689(-8)? (STDERR) 
W20250123-09:46:58.689(-8)? (STDERR) TypeError: Missing parameter name at 8: https://git.new/pathToRegexpError
W20250123-09:46:58.689(-8)? (STDERR)     at name (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:153:13)
W20250123-09:46:58.689(-8)? (STDERR)     at lexer (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:171:21)
W20250123-09:46:58.689(-8)? (STDERR)     at lexer.next (<anonymous>)
W20250123-09:46:58.689(-8)? (STDERR)     at Iter.peek (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:188:32)
W20250123-09:46:58.689(-8)? (STDERR)     at Iter.tryConsume (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:195:24)
W20250123-09:46:58.689(-8)? (STDERR)     at Iter.text (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:213:26)
W20250123-09:46:58.689(-8)? (STDERR)     at consume (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:285:23)
W20250123-09:46:58.690(-8)? (STDERR)     at parse (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:320:18)
W20250123-09:46:58.690(-8)? (STDERR)     at /Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:503:40
W20250123-09:46:58.690(-8)? (STDERR)     at Array.map (<anonymous>)
W20250123-09:46:58.690(-8)? (STDERR)     at pathToRegexp (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:502:23)
W20250123-09:46:58.690(-8)? (STDERR)     at Object.match (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/path-to-regexp/src/index.ts:461:28)
W20250123-09:46:58.690(-8)? (STDERR)     at matcher (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/router/lib/layer.js:83:23)
W20250123-09:46:58.690(-8)? (STDERR)     at new Layer (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/router/lib/layer.js:90:62)
W20250123-09:46:58.690(-8)? (STDERR)     at Function.use (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/router/index.js:391:19)
W20250123-09:46:58.690(-8)? (STDERR)     at Function.<anonymous> (/Users/gischer/.meteor/packages/webapp/.2.0.4.17i3zeg.o119++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/express/lib/application.js:224:21)
W20250123-09:46:58.690(-8)? (STDERR) 
W20250123-09:46:58.690(-8)? (STDERR) Node.js v20.18.0
=> Exited with code: 1

This is on MacOs. I am running Meteor 3.0.4

Do I need to back off to Meteor 2.something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions