本文介绍了无法创建自耕农 webapp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用 yeoman 创建一个 web 应用程序时,我得到了这个.

I get this when I try to create a webapp with yeoman.

/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:66
                throw err;
                      ^
Error: EACCES, permission denied '/root/.config/configstore/insight-yo.yml'
You don't have access to this file.

    at Object.fs.openSync (fs.js:436:18)
    at Object.fs.writeFileSync (fs.js:975:15)
    at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
    at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
    at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
    at process.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/insight/lib/push.js:11:16)
    at process.emit (events.js:98:17)
    at handleMessage (child_process.js:322:10)
    at Pipe.channel.onread (child_process.js:349:11)

我用谷歌搜索并尝试了以下方法,但没有帮助:

I googled and I tried the following things, but it didn't help:

chown root /root/.config/configstore/insight-yo.yml

chown myusername /root/.config/configstore/insight-yo.yml

安装 npm-sudo-fix 并运行它,但还没有成功.

Installed npm-sudo-fix and ran it, and no luck yet.

我使用的是 Debian Wheezy 并且有 npm 1.4.4.

I am on Debian Wheezy and have npm 1.4.4.

推荐答案

我遇到了同样的问题.我运行了下面的命令,它解决了我的问题:

I was facing the same issue. I ran the command below, It fixed my problem:

mkdir -p /root/.config/configstore

chmod g+rwx /root /root/.config /root/.config/configstore

这篇关于无法创建自耕农 webapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 06:09