Laravel Homestead,npm安装--无bin链接错误

Laravel Homestead,npm安装--无bin链接错误,laravel,npm,vagrant,npm-install,homestead,Laravel,Npm,Vagrant,Npm Install,Homestead,我正在使用fresh Homestead(盒式版本0.5)开发全新的Laravel 5.3应用程序。主机操作系统是Windows10 我在运行npm安装时遇到此错误--没有bin链接 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please upda

我正在使用fresh Homestead(盒式版本0.5)开发全新的Laravel 5.3应用程序。主机操作系统是Windows10

我在运行
npm安装时遇到此错误--没有bin链接

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6

npm ERR! Maximum call stack size exceeded
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/t1/t1/npm-debug.log
npm警告已弃用minimatch@2.0.10:请更新至minimatch 3.0.2或更高版本,以避免RegExp DoS问题
npm警告已弃用minimatch@0.2.14:请更新至minimatch 3.0.2或更高版本,以避免RegExp DoS问题
npm警告已弃用-fs@1.2.3:fs v3.0.0及之前版本将在节点版本>=v7.0时失败。请尽快更新到优雅的fs@^4.0.0。使用“npm ls-fs”在树中查找它。
npm错误!Linux 4.4.0-22-generic
npm错误!argv“/usr/bin/nodejs”“/usr/bin/npm”“安装”“--无bin链接”
npm错误!节点v5.12.0
npm错误!npm v3.8.6
npm错误!超过最大调用堆栈大小
npm错误!
npm错误!如果需要帮助,您可以在以下位置报告此错误:
npm错误!
npm错误!请在任何支持请求中包括以下文件:
npm错误/home/vagrant/t1/t1/npm-debug.log
npm-debug.log

.........
71199 silly build replace-ext@0.0.1
71200 silly build vinyl@1.2.0
71201 silly build require-dir@0.3.1
71202 silly build require-directory@2.1.1
71203 silly build require-main-filename@1.0.1
71204 silly build resolve@1.1.7
71205 silly build rechoir@0.6.2
71206 silly build resolve-url@0.2.1
71207 silly build rev-hash@1.0.0
71208 silly build rev-path@1.0.0
71209 silly build right-align@0.1.3
71210 verbose stack RangeError: Maximum call stack size exceeded
71210 verbose stack     at process.stderr (internal/process/stdio.js:23:46)
71210 verbose stack     at isTTY (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js:11:17)
71210 verbose stack     at Object.ProgressBar.show (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js:132:8)
71210 verbose stack     at Object.ProgressBar.pulse (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js:124:8)
71210 verbose stack     at EventEmitter.log.emitLog (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:178:40)
71210 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:170:8)
71210 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:231:21)
71210 verbose stack     at tracker.(anonymous function) [as silly] (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:79:19)
71210 verbose stack     at module.exports (/usr/lib/node_modules/npm/lib/install/action/build.js:8:7)
71210 verbose stack     at actions.(anonymous function) (/usr/lib/node_modules/npm/lib/install/actions.js:48:12)
71211 verbose cwd /home/vagrant/t1/t1
71212 error Linux 4.4.0-22-generic
71213 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links"
71214 error node v5.12.0
71215 error npm  v3.8.6
71216 error Maximum call stack size exceeded
71217 error If you need help, you may report this error at:
71217 error     <https://github.com/npm/npm/issues>
71218 verbose exit [ 1, true ]
。。。。。。。。。
71199愚蠢的构建替换-ext@0.0.1
71200愚蠢的身材vinyl@1.2.0
71201愚蠢的构建要求-dir@0.3.1
71202愚蠢的构建要求-directory@2.1.1
71203愚蠢的构建需要主-filename@1.0.1
71204愚蠢的身材resolve@1.1.7
71205愚蠢的身材rechoir@0.6.2
71206生成解析-url@0.2.1
71207愚蠢的构建版本-hash@1.0.0
71208愚蠢的构建版本-path@1.0.0
71209愚蠢的建造权-align@0.1.3
71210详细堆栈范围错误:超过最大调用堆栈大小
71210 process.stderr上的详细堆栈(internal/process/stdio.js:23:46)
71210 isTTY的详细堆栈(/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress bar.js:11:17)
71210 Object.ProgressBar.show处的详细堆栈(/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/ProgressBar.js:132:8)
71210 Object.ProgressBar.pulse处的详细堆栈(/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/ProgressBar.js:124:8)
71210 EventEmitter.log.emitLog上的详细堆栈(/usr/lib/node_modules/npm/node_modules/npmlog/log.js:178:40)
71210事件发射器上的详细堆栈。(/usr/lib/node_modules/npm/node_modules/npmlog/log.js:170:8)
71210事件发射器上的详细堆栈。(/usr/lib/node_modules/npm/node_modules/npmlog/log.js:231:21)
71210跟踪器上的详细堆栈。(匿名函数)[愚蠢](/usr/lib/node_modules/npm/node_modules/npmlog/log.js:79:19)
71210 module.exports处的详细堆栈(/usr/lib/node_modules/npm/lib/install/action/build.js:8:7)
71210操作时的详细堆栈。(匿名函数)(/usr/lib/node_modules/npm/lib/install/actions.js:48:12)
71211详细cwd/home/vagrant/t1/t1
71212错误Linux 4.4.0-22-generic
71213错误argv“/usr/bin/nodejs”“/usr/bin/npm”“安装”“--无bin链接”
71214错误节点v5.12.0
71215错误npm v3.8.6
71216错误超出了最大调用堆栈大小
71217错误如果您需要帮助,可以在以下位置报告此错误:
71217错误
71218详细退出[1,true]
没有
--没有bin链接
它可以工作(当然,如果不在共享文件夹内)

更新了node和npm(6.9.1,3.10.8),同一版本。

我开发了一种特殊的方法使其能够正常工作。以下是基本步骤:

  • 首先,从Vagrant共享文件夹中创建一个目录。例如,它可以是“/home/vagrant/node”
  • 就在这里,我们将从Laravel安装中复制package.json文件,告诉npm要安装什么。。。请注意,最近创建的“node”目录位于Unix系统中,与Windows主机无关(因为它不是两者之间共享文件夹的一部分)
  • 第三,我们将运行npm install命令(没有--no-bin-links选项,因为Unix支持符号链接。应该没有错误;)
  • 最后,我们将把“node_modules”目录移回Laravel安装文件夹(共享文件夹),但在Windows主机上以管理员权限从控制台运行了vagrant up命令。否则,尝试移动创建的符号链接将导致错误
这一切都能正常工作,因为它是为Laravel应用程序服务的Unix机器。 此过程将帮助您顺利安装Laravel Mix


干杯

您可以试试这个,因为这是我通常使用的系统:

> npm install --no-bin-links
> npm install --no-bin-links
> npm rebuild node-sass

第一次
npm安装
通常会出现错误,并显示“超出了最大调用堆栈大小”。第二个
npm安装
从它停止的地方开始并完成安装
node sass
通常在这一点上被破坏,因此
npm rebuild
修复了
node sass
安装。

有点晚,但您解决了吗?怎么用?我也处于同样的情况…@和CL85不,我只是使用了主机上的npm(和
artisan serve
iirc),同时仍然使用Homestead作为数据库。后来我换成了纱线,
纱线——没有垃圾箱链接
似乎很好用。谢谢。顺便说一句,我已经开发出一种方法,利用宅基地使所有的工作顺利进行;)。我在回答中解释。如果它允许在以管理员身份运行时移动符号链接,它不能在这里创建符号链接而不移动吗?每次添加软件包时都这样做似乎不方便:)也许至少可以自动化,比如使用npm预安装脚本。但我认为最简单的解决方案是切换到Thread:)它还具有类似于Thread.lock和更快安装的良好功能。(只需将命令添加到项目根目录中的after.sh即可将其安装到Homestead)我的经验是,一旦安装完成,每个后续的npm安装命令都不会抛出错误,从而得到最佳解决方案。无需每次添加新包时都执行此操作;)