Skip to content

[1.6] Starting meteor shell overwrite _ in the main server #9276

@gregory

Description

@gregory

The version of Meteor showing the problem.

$ meteor --version`
 1.6
$ meteor npm version -> 
{ test: '0.0.1',
  npm: '5.4.2',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.8.1',
  openssl: '1.0.2l',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.42',
  zlib: '1.2.11' }

The last version of Meteor where the problem did not occur (if applicable)

1.5.2 - which shipped with node version != 8.8.1

The operating system you're running Meteor on.

macOs Sierra beta

The expected behavior.

when i'm starting meteor shell, i'm not expecting _ to be overwritten on the server side.

The actual behavior.

After starting a shell, _ will be undefined in the server and break the app anywhere it we used _
Stopping the shell doesn't fix the issue.
This makes it really hard to test things in dev mode.

A simple reproduction!

  • install meteor 1.6
  • write some code that rely on _. You can optionally define _ = require('underscore') (it should be available globally already since underscore ship with meteor)
  • start the server
  • start a shell
  • notice _ is undefined
  • notice when you do const _ = require('underscore') and _ is still undefined
  • call your function relying on _ and watch it fail.

This might be related: nodejs/node#14226

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions