Tag: macos

由于.framework文件夹,gulp复制源失败

我试图运行一个命令,将我的项目内容复制到另一个文件夹,我一直有这个错误: Error: EISDIR: illegal operation on a directory, read 我缩小它知道是造成问题的.framework文件夹。 如果我删除它工作正常。 问题是我需要该项目中的文件夹,因为我正在制作一个InDesign HTML插件需要一个PluPlug框架。 这是我的环境: Mac OSX 10.11.6 npm -v 4.0.5 node -v 7.4.0 gulp -v CLI version 1.2.2Local version 3.9.1

在mac上运行“bower install”

我正在尝试使用npm完成bower install后运行bower install 。 但问题是,当我运行sudo bower install ,它说bower should be run without sudo 。 如果运行bower install它说permission denied cannot access file – ~/.config/configstore/bower-github.json 我试图切换到根用户,但没有运气。 可以做些什么来解决这个问题?

连接到mongo容器使用节点获取MongoError

出于某种原因,我无法使用其他本主题上的stackoverflowpost工作。 我得到: MongoError: failed to connect to server [localhost:27017] on first connect 。 我开始了我的docker集装箱,并检查mongo是否工作: $ docker run –name my-mongo -d mongo $ docker exec -it my-mongo bash # mongo MongoDB shell version v3.4.2 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.2 Server has startup warnings: 2017-03-19T01:23:53.047+0000 I STORAGE [initandlisten] 2017-03-19T01:23:53.047+0000 I STORAGE [initandlisten] ** WARNING: Using […]

Brew安装后使用错误版本的节点

我正在使用带有最新macOS(10.12.3)的Macbook,并通过运行安装了自制软件: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 之后,我安装了节点: brew install node 并试图升级它: > brew upgrade node > Error: node 7.8.0 already installed 我得到了一个错误,说7.8.0版已经安装,这是因为我刚刚安装了最新版本。 问题:在我运行的terminal上: > node –version > v4.4.5 并找回了显然已经安装的旧版本。 另外,当我通过npm安装一些新的软件包时,我得到一个警告,说明软件包需要更新版本的节点。 问题:我似乎在我的Mac上安装了两个版本的节点,我怎样才能使用最新的? 我怎样才能卸载所有其他旧的节点版本? 非常感谢您的帮助!

NodeJs,moch / chai在macOS上出现“Segmentation fault:11”失败

我正在运行mocha / chai(3.2.0 / 3.5.0)基于我的nodejs(6.10.2)基于应用程序的testing用例,在macOS 10.12.4,我运行到“分段错误:11”失败。 到目前为止我已经尝试过: 擦除我的node_modules文件夹并做一个新的npm install 检查过时的依赖关系并升级它们 通过sudo port upgrade nodejs6升级nodejs版本(使用6.7.0) 对我来说失败的代码如下。 chai.request(url) .post(`/api/filestore?token=${token}`) .timeout(20000) .attach('file', fs.readFileSync(filepath), filename) .field('name', data.name) .field('description', data.description) .field('keywords', data.keywords) .end(function(err, res) { if (err) { done(err); } res.should.have.status(200); res.should.be.json; res.body.should.have.property('name'); res.body.should.have.property('description'); res.body.should.have.property('categories'); res.body.keywords.should.be.a('array'); res.body.keywords.join(',').should.be.equal(data.keywords); done(); }); 删除“附加”行时,分段错误消失: .attach('file', fs.readFileSync(filepath), filename) 我已经单独尝试了fs.readFileSync(filepath) ,我没有遇到这个问题。 这在过去不是问题,最近才成为问题。 我想知道它是否与操作系统的升级是一致的,但我不能确定。 testing文件只有34K大小。 有没有人有什么build议? 编辑:在Ubuntutesting机上也出现分段错误。

如何在macOS上调用“安装警报”窗口

我有基于Electron.js的应用程序,在安装之前,我必须closures一些其他的应用程序,所以我试图寻找有关系统“安装警报”窗口在谷歌和electron.js文件的信息,但我没有find任何东西。 我必须调用系统“安装开孔”,并在安装开始之前传递必须closures的应用程序列表。 如果可能的话,有人可以帮我解决这个问题吗?

npm不支持Node.js v0.10.32

我使用MacOS Seirra并使用nodejs网站安装节点。 我安装了node 7.10.0 当我运行命令node -v我得到v0.10.32作为结果,当我运行npm -v我得到4.2.0作为结果 当我尝试安装一个npm包时,我得到这个错误 npm WARN npm npm does not support Node.js v0.10.32 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm You can find the latest version […]

Microsoft Azure函数和节点 – 我是Mac用户。 如何在Azure Portal中上传/安装Node软件包?

我正在开发Microsoft Azure中的一个Node应用程序/ Azurefunction应用程序,并且正在搞清楚在哪里以及如何安装Node软件包。 我在Mac上,主要是在我的本地开发环境中开发应用程序的胆量。 我已经将我的本地JavaScript文件的内容粘贴到Azure用户界面中,除此之外,我不知道如何安装第三方Node模块。 是否有一个简单的方法来基本获得项目的命令行视图,并以某种方式通过NPM安装必要的模块?

如何修复macOS上的node.js写入文件权限被拒绝的错误?

我设置node.js写入到本地文件夹中的文件,如下所示: 注:我已经使用sudo chmod 755 req.txt和sudo chmod 755 bodyhead.txt来设置文件的权限是可写的。 fs.writeFile('/req.txt', req + '\r\n!ended!\r\n', function(err) { if(err) { return console.log(err); } }); fs.writeFile('/bodyhead.txt', bodyhead + '\r\n!ended!\r\n', function(err) { if(err) { return console.log(err); } }); 并收到: { Error: EACCES: permission denied, open '/req.txt' errno: -13, code: 'EACCES', syscall: 'open', path: '/req.txt' } 以及 { Error: EACCES: permission denied, […]

节点Web服务器在外部不可见,但Python是(MacOS)

我刚刚开始构build一个Ionic 2应用程序,但我无法在我的移动设备上正常工作。 Python(作品) 为了演示手机可以看到主机,我尝试了一个Python服务器: $ python -m SimpleHTTPServer 8000 Serving HTTP on 0.0.0.0 port 8000 … 如果我在手机上访问http://192.168.8.101:8000 , 它连接正常,并显示目录列表。 节点(失败) 但是,当我启动Ionic时: $ ionic serve -p 8000 […] [INFO] Development server running Local: http://localhost:8000 External: http://192.168.8.101:8000 我可以在我的主机的networking浏览器中加载它,但是我无法从我的手机或其他计算机上看到它 (超时)。 我也尝试了一个基本的节点服务器 : $ npm install http-server -g $ http-server -p 8000 Starting up http-server, serving ./ Available on: […]