You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package is used as a dependency with Nuxt. When importing file outside the project root on a windows machine the 'readNearestPackageJSON ' function enters an infinite loop. Running the same code in Linux does not present the problem. The exit condition of the while loop is never met because root directory is misidentified. The root is 'C:' (not '/'). The solution is finding the root directory agnostic of the OS. Perhaps something like this:
This package is used as a dependency with Nuxt. When importing file outside the project root on a windows machine the 'readNearestPackageJSON ' function enters an infinite loop. Running the same code in Linux does not present the problem. The exit condition of the while loop is never met because root directory is misidentified. The root is 'C:' (not '/'). The solution is finding the root directory agnostic of the OS. Perhaps something like this:
path.parse(process.cwd()).root
Current Function:
Possible Updated Function:
The text was updated successfully, but these errors were encountered: