在 Laravel 5.6 项目中执行 npm 运行 dev 在 95% 时停止
Executing npm run dev in Laravel 5.6 project halts at 95% emitting
我在使用 Laravel 5.6 时遇到 laravel-mix 的问题。每次我执行 npm 运行 dev,控制台执行停止在 95% emitting:
@ dev C:\Users\ricky\Dropbox\Projects-TARCS\src\tarcs
npm run development
@ development C:\Users\ricky\Dropbox\Projects-TARCS\src\tarcs
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
创建了一个干净的 Laravel 5.6 项目,执行 npm install 然后 npm 运行 dev.
我一直在网上搜索,发现很多人遇到了同样的问题,他们在 webpack.mix.js:[=16 中指定 public 路径解决了这个问题=]
mix.setPublicPath("./");
或
mix.options({
publicPath: './'
});
我的情况还没能解决问题。
我当前的 webpack.mix.js 设置:
let mix = require('laravel-mix');
mix.setPublicPath("./"); //mix.setPublicPath("./public");
/*mix.options({
publicPath: './' //publicPath: './public'
});*/
mix.js('resources/assets/js/app.js', 'public/js');
mix.sass('resources/assets/sass/app.scss', 'public/css');
我的系统规格:
- Windows 10 x64(版本 1803);
- 节点:10.0.0;
- NPM:5.6.0;
- Laravel 5.6;
我该如何解决我的问题?
终于解决了我的问题!
我正在使用 Dropbox 来存储我的所有项目,并且由于我有两个链接的帐户(个人和企业),Dropbox 创建了一个指向新文件夹(Dropbox(个人)和 Dropbox(企业))的符号链接。这不知何故导致了我的问题...
来自Dropbox:
If your team members already have Dropbox installed on their
computers, all files and most applications will automatically point to
the new work Dropbox folder and subfolders. Dropbox will create a
hidden symlink that points to the new Dropbox folder from the old
location. Fresh installs don’t require this, as the Dropbox folder is
created with the business name from the beginning.
Applications with absolute paths might need to be tested individually,
so we strongly encourage you to test your existing configurations
before the desktop application is updated.
我只是取消了我的企业帐户的链接并开始使用主 Dropbox 文件夹。一切都按预期工作。
这是解决我的问题的最快方法,但理想的方法是将我的两个 Dropbox 帐户关联起来。我会检查如何做到这一点,并用详细信息更新答案。
我在使用 Laravel 5.6 时遇到 laravel-mix 的问题。每次我执行 npm 运行 dev,控制台执行停止在 95% emitting:
@ dev C:\Users\ricky\Dropbox\Projects-TARCS\src\tarcs
npm run development
@ development C:\Users\ricky\Dropbox\Projects-TARCS\src\tarcs
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
创建了一个干净的 Laravel 5.6 项目,执行 npm install 然后 npm 运行 dev.
我一直在网上搜索,发现很多人遇到了同样的问题,他们在 webpack.mix.js:[=16 中指定 public 路径解决了这个问题=]
mix.setPublicPath("./");
或
mix.options({
publicPath: './'
});
我的情况还没能解决问题。
我当前的 webpack.mix.js 设置:
let mix = require('laravel-mix');
mix.setPublicPath("./"); //mix.setPublicPath("./public");
/*mix.options({
publicPath: './' //publicPath: './public'
});*/
mix.js('resources/assets/js/app.js', 'public/js');
mix.sass('resources/assets/sass/app.scss', 'public/css');
我的系统规格:
- Windows 10 x64(版本 1803);
- 节点:10.0.0;
- NPM:5.6.0;
- Laravel 5.6;
我该如何解决我的问题?
终于解决了我的问题!
我正在使用 Dropbox 来存储我的所有项目,并且由于我有两个链接的帐户(个人和企业),Dropbox 创建了一个指向新文件夹(Dropbox(个人)和 Dropbox(企业))的符号链接。这不知何故导致了我的问题...
来自Dropbox:
If your team members already have Dropbox installed on their computers, all files and most applications will automatically point to the new work Dropbox folder and subfolders. Dropbox will create a hidden symlink that points to the new Dropbox folder from the old location. Fresh installs don’t require this, as the Dropbox folder is created with the business name from the beginning.
Applications with absolute paths might need to be tested individually, so we strongly encourage you to test your existing configurations before the desktop application is updated.
我只是取消了我的企业帐户的链接并开始使用主 Dropbox 文件夹。一切都按预期工作。 这是解决我的问题的最快方法,但理想的方法是将我的两个 Dropbox 帐户关联起来。我会检查如何做到这一点,并用详细信息更新答案。