Giter VIP home page Giter VIP logo

cspell-eaccess-in-docker-container-issue's Introduction

EACCESS error when running cspell in a docker container

✔️ This issue was fixed in version 5.6.7

The problem

This repository contains example code for Github issue cspell 1510.

This repository defines a Dockerfile with Node and cspell that has a keepAlive script, to enable it to be used with docker-compose. This allows a user start docker-compose and trigger a spellcheck with all the correct settings applied whenever they need it on whatever machine they have.

Using this repo:

$ docker-compose up -d
$ docker-compose exec --workdir /app/repository node npm run spellcheck

This should produce output like the following:

> [email protected] spellcheck
> cspell 'src/**/*.md'

Error: EACCES: permission denied, open '/root/.config/configstore/cspell.json'
You don't have access to this file.

    at Object.openSync (node:fs:582:3)
    at Object.readFileSync (node:fs:450:35)
    at Configstore.get all [as all] (/app/repository/node_modules/configstore/index.js:34:25)
    at Object.getRawGlobalSettings (/app/repository/node_modules/cspell-lib/dist/Settings/GlobalSettings.js:20:30)
    at Object.getGlobalSettings (/app/repository/node_modules/cspell-lib/dist/Settings/CSpellSettingsServer.js:465:45)
    at determineFinalDocumentSettings (/app/repository/node_modules/cspell-lib/dist/spellCheckFile.js:179:103)
    at spellCheckFullDocument (/app/repository/node_modules/cspell-lib/dist/spellCheckFile.js:116:25)
    at async processFile (/app/repository/node_modules/cspell/dist/lint.js:53:23)
    at async Object.measurePromise (/app/repository/node_modules/cspell/dist/util/timer.js:8:9)
    at async processFiles (/app/repository/node_modules/cspell/dist/lint.js:111:39) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/root/.config/configstore/cspell.json'
}
1/1 ./src/some.md 478.96ms X
/app/repository/src/some.md:3:17 - Unknown word (Haus)
CSpell: Files checked: 1, Issues found: 1 in 1 files

cspell-eaccess-in-docker-container-issue's People

Contributors

pingvinen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.