gpt4 book ai didi

angularjs - 重新安装应用程序后ngAnnotate EPERM(无法写入)

转载 作者:太空宇宙 更新时间:2023-11-03 23:37:24 27 4
gpt4 key购买 nike

我使用 ngBoilerplate 作为我的应用程序的基础。ngbp 使用 ngAnnotate 和 grunt-ng-annotate 来很好地注释应用程序。

一切都工作正常,直到我必须格式化我的计算机并从我的 git 帐户重新安装应用程序。

我已经使用 npm install、bower install 和 grunt install 再次安装了所有内容,所有内容似乎都已正确安装,所有依赖项都存在并且所有路由都正确。

当我运行“grunt watch”时,构建过程正常工作。当我运行“grunt build”时,构建过程在 ngAnnotate 上失败,每次都会在不同的文件上停止,因此问题与错误消息中显示的文件无关

Running "ngAnnotate:compile" (ngAnnotate) taskWarning: Unable to write "build/src/app/somefile.js" file (Error code: EPERM). Use --force to continue.Aborted due to warnings.

这是 ngAnnotate 配置(编辑器删除了一些图表,请参阅 https://gist.github.com/orzilca/f8a7312587a710094342 ):

    ngAnnotate: {        compile: {            files: [                {                    src: [ 'app_files.js (trimmed, see the link above)' ],                    cwd: 'build_dir',                    dest: 'build_dir',                    expand: true                }            ]        }    },

这是 app_files.js 数组:

    app_files: {        js: [ 'src/**/*.js', '!src/**/*.spec.js', '!src/assets/**/*.js' ]    }

完整的 grunt 文件在这里: https://gist.github.com/orzilca/f25206920943231e15fe

任何帮助将不胜感激,谢谢!

最佳答案

找到了解决此问题的方法!

使用npm outdated 我发现我使用的是过时版本的ng-annotate (0.8.0)。更新到最新的稳定版本(0.10.0)似乎可以解决该问题。

构建过程无法完美运行:)

关于angularjs - 重新安装应用程序后ngAnnotate EPERM(无法写入),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30421673/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com