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

Error: EBUSY: resource busy or locked, open 'D:\my-project\source\js\bundle.js' #388

Open
auseidon986 opened this issue Jun 3, 2023 · 0 comments

Comments

@auseidon986
Copy link

System:
Windows 10 - Windows NT: 10.0.22621

Node version:
v12.20.0

Command:
npx watchify -o ./source/js/bundle.js ./source/js/main.ts -p [ tsify --noImplicitAny ] > ./source/js/bundle.js

Error:
[Error: EBUSY: resource busy or locked, open 'D:\my-project\source\js\bundle.js'] {
errno: -4082,
code: 'EBUSY',
syscall: 'open',
path: 'D:\my-project\source\js\bundle.js'

As I check with Resource Checker, it appears that 2 cmd.exe and node.exe are accessing bundle.js.
If I kill node project, nothing process then holds this file.

I googled for a while, and suggestions are

  • npm cache clean --force
  • Uninstall any malware software (I do not have one)
  • Disable Windows Defender

But none of above solutions worked for me.

I guess this could be watchfy and windows os specific problem, so decided to post here.
Please help me out.

Following is package.json file


{
  "name": "pattern-lab-test",
  "version": "1.0.0",
  "description": "",
  "type": "commonjs",
  "main": "main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "patternlab build --config ./patternlab-config.json",
    "build:uikit": "cross-env-shell PL_CONFIG_PATH='${INIT_CWD}/.patternlabrc.js' npm run build --prefix node_modules/@pattern-lab/uikit-workshop -- --patternlabrc '$PL_CONFIG_PATH'",
    "dev": "node ./node_modules/@pattern-lab/uikit-workshop/build-tools.js",
    "help": "patternlab --help",
    "install": "patternlab install --config ./patternlab-config.json",
    "serve": "patternlab serve --config ./patternlab-config.json",
    "start": "npm run serve",
    "version": "patternlab --version",
    "watch:sass": "sass --no-source-map --watch ./source/css/index.scss:public/css/style.css",
    "watch:ts": "npx tsc -w",
    "compile:ts": "npx watchify -o ./source/js/bundle.js ./source/js/main.ts -p [ tsify --noImplicitAny ] > ./source/js/bundle.js",
    "develop": "concurrently \"npm run start\" \"npm run watch:sass\" \"npm run compile:ts\"",
    "build:css": "minify public/css/style.css > public/css/style.min.css",
    "build:ts": "minify public/js/bundle.js > public/js/bundle.min.js",
    "build:all": "concurrently \"npm run build:ts\" \"npm run build:css\""
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@pattern-lab/cli": "^5.16.2",
    "@pattern-lab/core": "^5.16.2",
    "@pattern-lab/engine-twig-php": "^5.16.2",
    "@pattern-lab/starterkit-twig-demo": "^5.16.1",
    "@pattern-lab/uikit-workshop": "^5.16.2",
    "@types/flickity": "^2.2.7",
    "@types/lodash.debounce": "^4.0.7",
    "accordion-js": "^3.3.2",
    "flickity": "^3.0.0",
    "flickity-imagesloaded": "^2.0.0",
    "micromodal": "^0.4.10",
    "scrollmagic": "^2.0.8",
    "youtube-player": "^5.5.2"
  },
  "devDependencies": {
    "@types/node": "^18.11.2",
    "@types/scrollmagic": "^2.0.3",
    "@types/youtube-player": "^5.5.6",
    "@vimeo/player": "^2.18.0",
    "concurrently": "^7.4.0",
    "minify": "^9.1.0",
    "sass": "^1.55.0",
    "tsify": "^5.0.4",
    "typescript": "^4.8.4",
    "watchify": "^4.0.0"
  }
}

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

1 participant