admin管理员组文章数量:1122826
My package.json looks like this (partially):
{
"browserslist" : [
"> 1%"
],
"dependencies" : {
"bootstrap": "^5.3"
},
"devDependencies" : {
"parcel": "latest",
"rimraf": "^6.0",
"sass" : "^1.81"
},
"source": ["src/scss/main.scss", "src/scss/other.scss"]
}
Every time I try to install, I get this dump of errors:
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup '\\\\?\\F:\\path\\to\\my\\project\\node_modules\\@parcel\\watcher',
npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'F:\path\\to\\my\\project\node_modules\@parcel\watcher'] {
npm warn cleanup errno: -4082,
npm warn cleanup code: 'EBUSY',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'F:\\path\\to\\my\\project\\node_modules\\@parcel\\watcher'
npm warn cleanup }
npm warn cleanup ],
npm warn cleanup [
npm warn cleanup '\\\\?\\F:\\path\\to\\my\\project\\node_modules\\@parcel',
npm warn cleanup [Error: EBUSY: resource busy or locked, rmdir 'F:\path\\to\\my\\project\node_modules\@parcel\watcher'] {
npm warn cleanup errno: -4082,
npm warn cleanup code: 'EBUSY',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'F:\\path\\to\\my\\project\\node_modules\\@parcel\\watcher'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path F:\path\to\my\project\node_modules\lmdb
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build-optional-packages
npm error 'node-gyp-build-optional-packages' is not recognized as an internal or external command,
npm error operable program or batch file.
I'm deleting node_modules
(and package-lock.json) before I run npm i
. I ran npm cache clean --force
. I opened Windows Terminal as administrator. Nothing works. Interestingly, I have no issue installing Parcel globally, but running it globally is another matter. Maybe that's an issue for a separate question, but if you wish to know, when I install it globally and try to run parcel build
, it says there are "no entries". If I run parcel build src/scss/main.scss src/scss/other.scss
I get farther, but it fails to resolve relative paths to Bootstrap's SCSS files. For example, I have this in main.scss
:
@use "variables";
@use "functions";
@use "bootstrap/scss/bootstrap-grid" as twb-grid with (
$grid-breakpoints : variables.$grid-breakpoints,
$grid-gutter-width : variables.$grid-gutter-width,
$container-max-widths : variables.$container-max-widths,
$spacer : variables.$grid-gutter-width,
);
It complains that it can't find the stylesheet. I was able to install Parcel locally in the past on other projects without any problems and I didn't get these errors when I ran parcel build
. Please help!
本文标签: npm fails to install Parcel locally on WindowsStack Overflow
版权声明:本文标题:npm fails to install Parcel locally on Windows - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306995a1933160.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论