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

Storyshots Integrity › Abandoned Storyshots › encountered a declaration exception #2751

Closed
ValeryIvanov opened this issue Jan 15, 2018 · 4 comments

Comments

@ValeryIvanov
Copy link

Issue details

So this is rather strange situation. When running Stroyshots in my dev machine everything passes. When I run them in CI server in docker env, I get following error

> node scripts/test.js --env=jsdom "--coverage"

 => Loading custom .babelrc
 FAIL  src/Storyshots.test.js
  ● Storyshots Integrity › Abandoned Storyshots › encountered a declaration exception

    EPERM: operation not permitted, scandir '/proc/1/map_files/55cf41c57000-55cf41c73000'

      at Object.fs.readdirSync (fs.js:904:18)
      at GlobSync.Object.<anonymous>.GlobSync._readdir (node_modules/glob/sync.js:288:41)
      at GlobSync.Object.<anonymous>.GlobSync._readdirInGlobStar (node_modules/glob/sync.js:267:20)
      at GlobSync.Object.<anonymous>.GlobSync._readdir (node_modules/glob/sync.js:276:17)
      at GlobSync.Object.<anonymous>.GlobSync._processReaddir (node_modules/glob/sync.js:137:22)
      at GlobSync.Object.<anonymous>.GlobSync._process (node_modules/glob/sync.js:132:10)
      at GlobSync.Object.<anonymous>.GlobSync._processGlobStar (node_modules/glob/sync.js:380:10)
      at GlobSync.Object.<anonymous>.GlobSync._process (node_modules/glob/sync.js:130:10)
      at GlobSync.Object.<anonymous>.GlobSync._processGlobStar (node_modules/glob/sync.js:383:10)
      at GlobSync.Object.<anonymous>.GlobSync._process (node_modules/glob/sync.js:130:10)

Storyshots are set up following this guide her for Create React App
https://github.com/storybooks/storybook/tree/master/addons/storyshots

Steps to reproduce

Not sure how to reproduce. Maybe someone here have an idea...

Please specify which version of Storybook and optionally any affected addons that you're running

Here are my dependancies regarding Storybook

  "devDependencies": {
    "@storybook/addon-actions": "^3.3.8",
    "@storybook/addon-links": "^3.3.8",
    "@storybook/addon-storyshots": "^3.3.8",
    "@storybook/addons": "^3.3.8",
    "@storybook/react": "^3.3.8",

Affected platforms

Both envs have same Nodejs and npm version

# node -v
v8.9.1
# npm -v
5.5.1

Screenshots / Screencast / Code Snippets (Optional)

error

@igor-dv
Copy link
Member

igor-dv commented Jan 15, 2018

I assume that you need to grant this permission, am I missing something? In fact, we have these tests running here in CI, and everything is fine

@ValeryIvanov
Copy link
Author

ValeryIvanov commented Jan 15, 2018

Hmm how would I grant this permission? Could you elaborate a bit more please?
Is it something I need to do in Dockerfile?

@igor-dv
Copy link
Member

igor-dv commented Jan 15, 2018

Actually, I'm not sure now.
Here is this open issue in glob package.

Maybe you can try to create some test app that executes const storyshots = glob.sync('**/*.storyshot'); and run it in your CI? BTW I assume that /proc/1/map_files/55cf41c57000-55cf41c73000 doesnt contain storyshots ?

@ValeryIvanov
Copy link
Author

Found the answer here
https://stackoverflow.com/a/47383952/2317192

Just changed working directory in Dockerfile and no more error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants