Closed Bug 1420934 Opened 2 years ago Closed 2 years ago

Can't run console tests

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: nchevobbe, Assigned: bgrins)

References

(Blocks 1 open bug)

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

npm tests throws : 

/Users/nchevobbe/Projects/mozilla-central/devtools/client/webconsole/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180
          throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
          ^

ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "/Users/nchevobbe/Projects/mozilla-central/devtools/client/netmonitor/.babelrc" at 0, attempted to resolve relative to "/Users/nchevobbe/Projects/mozilla-central/devtools/client/netmonitor"
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
For the error to show up, you need to *NOT* have a node_modules for the netmonitor.
So if you worked with the netmonitor previously, you should do `rm -rf devtools/client/netmonitor/node_modules`
@Ricky, this problem is caused by supporting the spread operator in the Net panel. Do you know how to fix it?

Honza
Flags: needinfo?(rchien)
We're adding spread operator as well in the console, so maybe it will be fixed.
That's great! And maybe you need to add babel transform option into the place where you execute mocha test.
Flags: needinfo?(rchien)
Blocks: 1401189
Assignee: nchevobbe → bgrinstead
Whiteboard: [newconsole-mvp]
Comment on attachment 8941898 [details]
Bug 1420934 - Ensure `npm install` on netmonitor before installing in webconsole;

https://reviewboard.mozilla.org/r/212112/#review217858

Did you try to reconfigure babel, so it looks for the missing plugin in webconsole dir?
Or there is no such way?

Honza
(In reply to Jan Honza Odvarko [:Honza] from comment #6)
> Did you try to reconfigure babel, so it looks for the missing plugin in
> webconsole dir?
> Or there is no such way?

I couldn't find a way. Also, I think ensuring that netmonitor is installed will be more resilient to similar errors in the future (like if they are using a different version of the same plugin, or if a new plugin is added only to netmonitor).
Comment on attachment 8941898 [details]
Bug 1420934 - Ensure `npm install` on netmonitor before installing in webconsole;

https://reviewboard.mozilla.org/r/212112/#review217876

I see, thanks for the patch Brian.

Honza
Attachment #8941898 - Flags: review?(odvarko) → review+
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c3494442dc4
Ensure `npm install` on netmonitor before installing in webconsole;r=Honza
https://hg.mozilla.org/mozilla-central/rev/8c3494442dc4
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.