我的meteor.js应用程序崩溃了。我收到以下错误。看来该错误不在我的应用程序代码中。如果有人可以查看以下消息并让我知道如何摆脱这个错误,我将不胜感激。
错误消息
Your application is crashing. Waiting for file change.
=> Modified -- restarting.
=> Errors prevented startup:
Exception while bundling application:
Error: EACCES, permission denied '/Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js'
at Object.fs.unlinkSync (fs.js:582:18)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:278:10)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.write_to_directory (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:794:11)
at Object.exports.bundle (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:873:12)
at /Users/username/.meteor/tools/275efdf2db/tools/run.js:694:26
at exports.inFiber (/Users/username/.meteor/tools/275efdf2db/tools/fiber-helpers.js:24:12)
=> Your application is crashing. Waiting for file change.
答案 0 :(得分:5)
这适用于我:为您的用户重新设置/.meteor/local/build
(以避免使用sudo)的chown权限。
例如,我的用户是“skozz”。在我的项目文件夹中:
sudo chown -R skozz .meteor/local/build
然后运行mrt
或meteor
如果问题仍然存在,您可能应该为主.npm文件夹设置相同的权限。就我而言:
chown -R skozz ~/.npm
答案 1 :(得分:4)
我在该主题上搜索了更多内容,使用sudo
安装meteorite
所需的某些软件包似乎存在问题。正如this Github issues page所建议的那样,解决此问题的一种方法是删除应用程序中的文件夹/.meteor/local/build
并重新启动流星。
答案 2 :(得分:0)
试
chmod +x /Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js
答案 3 :(得分:0)
我通过完全删除清除卸载解决了这个问题! nodejs和npm使用这个脚本' os x' :sudo rm /usr/local/bin/npm
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /opt/local/bin/node
sudo rm /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
sudo rm -rf /usr/local/include/node/
之后我在nodejs网站上下载的pkg(我在os x上的m)上正确安装了nodejs并对其进行了调整,然后所有工作都正常meteor update
和cd path/to/meteor/project ; meteor