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

Unable to Build. TypeError: Cannot assign to read only property 'atime' of object '#<Stats>' #2008

Open
Devric opened this issue May 5, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@Devric
Copy link

Devric commented May 5, 2024

Describe the bug
I'm trying to build this package to use with VIM debuger, but getting a type error when building

TypeError: Cannot assign to read only property 'atime' of object '#<Stats>'
  • also tried with bun, pnpm. below are log from npm
  • node version tried 22, 21, 17
  • m1 mac

To Reproduce
Steps to reproduce the behavior:

  1. npm install --legacy-peer-deps
  2. npx gulp vsDebugServerBundle

image

└─(21:22:44 on main ✹)──> npx gulp vsDebugServerBundle                                                                                                                                           ──(Sun,May05)─┘
(node:5460) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[21:22:50] Using gulpfile ~/.local/share/nvim/site/pack/packer/start/vscode-js-debug/gulpfile.js
[21:22:50] Starting 'vsDebugServerBundle'...
[21:22:50] Starting 'clean'...
[21:22:50] Finished 'clean' after 9.87 ms
[21:22:50] Starting 'compile'...
[21:22:50] Starting 'compile:static'...
(node:5460) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
[21:22:50] 'compile:static' errored after 50 ms
[21:22:50] TypeError: Cannot assign to read only property 'atime' of object '#<Stats>'
    at onFutimes (/Users/devric/.local/share/nvim/site/pack/packer/start/vscode-js-debug/node_modules/vinyl-fs/lib/file-operations.js:258:27)
    at FSReqCallback.oncomplete (node:fs:188:23)
    at FSReqCallback.callbackTrampoline (node:internal/async_hooks:130:17)
[21:22:50] 'compile' errored after 51 ms
[21:22:50] 'vsDebugServerBundle' errored after 63 ms
@Devric Devric added the bug Issue identified by VS Code Team member as probable bug label May 5, 2024
@connor4312
Copy link
Member

connor4312 commented May 6, 2024

I'm not able to reproduce this. E.g. in a fresh Docker image:

PS C:\Users\conno\Github\vscode-js-debug> docker run -it node:22 /bin/bash
root@594420f4bbb6:/# git clone https://github.com/microsoft/vscode-js-debug.git
Cloning into 'vscode-js-debug'...
remote: Enumerating objects: 24762, done.
remote: Counting objects: 100% (387/387), done.
remote: Compressing objects: 100% (233/233), done.
remote: Total 24762 (delta 198), reused 305 (delta 150), pack-reused 24375
Receiving objects: 100% (24762/24762), 21.62 MiB | 5.67 MiB/s, done.
Resolving deltas: 100% (19049/19049), done.
root@594420f4bbb6:/# cd vscode-js-debug/
root@594420f4bbb6:/vscode-js-debug# npm i
<snip>
root@594420f4bbb6:/vscode-js-debug# npx gulp vsDebugServerBundle
(node:136) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[15:20:05] Using gulpfile /vscode-js-debug/gulpfile.js
[15:20:05] Starting 'vsDebugServerBundle'...
[15:20:05] Starting 'clean'...
[15:20:05] Finished 'clean' after 11 ms
[15:20:05] Starting 'compile'...
[15:20:05] Starting 'compile:static'...
(node:136) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
[15:20:06] Finished 'compile:static' after 117 ms
[15:20:06] Starting 'compile:build-scripts'...
[15:20:06] Finished 'compile:build-scripts' after 381 ms
[15:20:06] Starting 'compile:dynamic'...
[15:20:06] Finished 'compile:dynamic' after 254 ms
[15:20:06] Starting 'compile:extension'...
[15:20:06] Finished 'compile:extension' after 146 ms
[15:20:06] Finished 'compile' after 899 ms
[15:20:06] Starting 'vsDebugServerBundle:webpack-bundle'...
[15:20:06] Finished 'vsDebugServerBundle:webpack-bundle' after 79 ms
[15:20:06] Starting 'l10n:bundle-download'...
[15:20:08] Finished 'l10n:bundle-download' after 1.82 s
[15:20:08] Finished 'vsDebugServerBundle' after 2.81 s
root@594420f4bbb6:/vscode-js-debug#

note that --legacy-peer-deps is not needed (but I didn't get the error if I added it).

If you want to try to update dependencies and find something that fixes this for you, I would happily take such a change in a PR.

@connor4312 connor4312 added the info-needed Issue requires more information from poster label May 6, 2024
@Devric
Copy link
Author

Devric commented May 7, 2024

It seems like it has something to do with file permission.
If I'm using docker internal path its fine, but failed to build on volume mapped host path.
Will do some more digging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants