Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevTools loading hidden files and crashing #189

Closed
bouncehead13 opened this issue May 15, 2019 · 2 comments
Closed

DevTools loading hidden files and crashing #189

bouncehead13 opened this issue May 15, 2019 · 2 comments

Comments

@bouncehead13
Copy link

@bouncehead13 bouncehead13 commented May 15, 2019

Description

When starting the disconnected proxy, I get the following error

{ YAMLException: end of the stream or a document separator is expected at line 1, column 1:
    
    ^
    at generateError (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readDocument (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:1539:5)
    at loadDocuments (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:1575:5)
    at load (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:1596:19)
    at Object.safeLoad (/Users/mhanco201/projects/xmobile-jss/node_modules/js-yaml/lib/js-yaml/loader.js:1618:10)
    at tryParseJsonOrYaml (/Users/mhanco201/projects/xmobile-jss/node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/mergeFs.js:13:38)
    at processFileSync (/Users/mhanco201/projects/xmobile-jss/node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/mergeFs.js:37:29)
    at /Users/mhanco201/projects/xmobile-jss/node_modules/@sitecore-jss/sitecore-jss-dev-tools/dist/mergeFs.js:84:39
    at Array.map (<anonymous>)
  name: 'YAMLException',
  reason: 'end of the stream or a document separator is expected',

From my investigation, mergeFs.js is processing all files including hidden ones. In this case, it is loading .DS_Store on my Mac which it should not be.

Expected behavior

The output from starting the disconnected server should not report any errors.

Steps To Reproduce

  1. Under your project, run npm run start:proxy

Possible Fix

The DevTools used to process the files under /data/content should not process hidden files.

Your Environment

  • NodeJS Version: 10.15.3
  • Sitecore Version: N/A
  • JSS Version: 11.0.2
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): Mac 10.14.4
@sc-dawidrutkowski

This comment has been minimized.

Copy link
Collaborator

@sc-dawidrutkowski sc-dawidrutkowski commented Oct 11, 2019

Fixed in #276

@sc-illiakovalenko

This comment has been minimized.

Copy link
Collaborator

@sc-illiakovalenko sc-illiakovalenko commented Oct 11, 2019

I could not reproduce this issue, but anyway I fixed this potential error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.