NervJS / nerv

A blazing fast React alternative, compatible with IE8 and React 16.
https://nerv.aotu.io
MIT License
5.43k stars 267 forks source link

nerv-server error: navigator is not defined #124

Closed i-like-robots closed 5 years ago

i-like-robots commented 5 years ago

When attempting to use nerv-server v1.3.12 in a Node environment it throws immediately:

require('nerv-server')
// throws ReferenceError: navigator is not defined

The issue is being thrown by the following line:

https://github.com/NervJS/nerv/blob/5d69c491b73a533aa36a5d83e5f9d7522956ba35/packages/nerv-utils/src/next-tick.ts#L4-L5

Removing this function (it does not appear to be used) resolves the issue.