compass:dist & execFile("compass.bat", ...) - 警告:生成 EPERM

compass:dist & execFile("compass.bat", ...) - Warning: spawn EPERM

首先,我是(现代)网络开发的新手,我尝试将现有项目导入我的 WebStorm 和 运行 G运行t 任务。

它在 "compass:dist" 处停止:

$ node.exe C:\Users\lgr\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt --gruntfile C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js buildall
    Initializing
Command-line options: --gruntfile=C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js, --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.

Registering "grunt-bump" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-bump\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-bump\package.json...OK
Loading "bump.js" tasks...OK
+ bump, bump-commit, bump-only

Registering "grunt-html2js" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-html2js\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-html2js\package.json...OK
Loading "html2js.js" tasks...OK
+ html2js

Registering "grunt-contrib-clean" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-clean\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-contrib-copy" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-copy\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-copy\package.json...OK
Loading "copy.js" tasks...OK
+ copy

Registering "grunt-contrib-concat" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-concat\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-concat\package.json...OK
Loading "concat.js" tasks...OK
+ concat

Registering "grunt-contrib-cssmin" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-cssmin\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-cssmin\package.json...OK
Loading "cssmin.js" tasks...OK
+ cssmin

Registering "grunt-contrib-watch" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-watch\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-watch\package.json...OK
Loading "watch.js" tasks...OK
+ watch

Registering "grunt-contrib-jshint" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-jshint\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-jshint\package.json...OK
Loading "jshint.js" tasks...OK
+ jshint

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-uglify\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-uglify\package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-karma" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-karma\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-karma\package.json...OK
Loading "grunt-karma.js" tasks...OK
+ karma

Registering "grunt-conventional-changelog" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-conventional-changelog\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-conventional-changelog\package.json...OK
Loading "changelog.js" tasks...OK
+ changelog

Registering "grunt-ngdocs" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-ngdocs\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-ngdocs\package.json...OK
Loading "grunt-ngdocs.js" tasks...OK
+ ngdocs

Registering "grunt-contrib-compass" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-compass\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-compass\package.json...OK
Loading "compass.js" tasks...OK
+ compass

Registering "grunt-contrib-requirejs" local Npm module tasks.
Reading C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-requirejs\package.json...OK
Parsing C:\Users\lgr\workspace\js\rit-workshop\ui\node_modules\grunt-contrib-requirejs\package.json...OK
Loading "requirejs.js" tasks...OK
+ requirejs
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
- watch
+ BuildCommit, after-test, archive, archiveNONmin, buildall, buildjs, buildjsCommit, buildjsNONmin, buildjsNONminCommit, css, cssmy, default, delta, incrementBuild, shell, templates, test, watch

Running tasks: buildall

Running "buildall" task

Running "clean:buildall" (clean) task
Verifying property clean.buildall exists in config...OK
Files: [no src]
Options: force=false, no-write=false
>> 0 paths cleaned.

Running "css" task

Running "compass" task

Running "compass:dist" (compass) task
Verifying property compass.dist exists in config...OK
File: [no files]
Options: config="config.rb"
Warning: spawn EPERM Use --force to continue.

Aborted due to warnings.

我试着用谷歌搜索了一下,但我似乎得到的只是这是一个权限错误,但我不知道从哪里开始修复它。

我尝试清理项目,为 Windows 重新安装 Ruby,在 ruby 中重新安装指南针。没有任何效果。

更新:

我尝试调试构建并在文件 bin-version\index.js

execFile(bin, ['--version'], function (err, stdout, stderr) {

似乎会抛出错误,因为调试器不会超出这一点。 bincompass.bat 看起来构建有一些权限错误?当我打开 cmd 并输入 "compass --version" 时,它工作正常。我的类路径中有 ruby/bin 以及 compass.bat 所在的位置。

Running "compass:dist" (compass) task
Verifying property compass.dist exists in config...OK
File: [no files]
Options: config="config.rb"
Warning: spawn EPERM Use --force to continue.

有谁知道导致此错误的原因吗?

我解决了这个问题,但我不能确切地说出是什么原因造成的。我能说的是,它与指南针本身、错误的权限或 Windows 无关 - 它与错误的项目设置有关。因此,如果您遇到此错误,请检查您的设置以及每个依赖项是否可用。