我在跑:
Laravel 混合版本:0.8.8
节点版本(7.5.0):
NPM 版本(4.1.2):
我正在尝试在我的 Laravel 5.4 项目中使用Firebase-adminnpm install --save firebase-admin
当我这样做require('firebase-admin');
时,我resources/assets/js/app.js
会运行npm run dev
此错误:
These dependencies were not found:
* fs in ./~/firebase-admin/lib/auth/credential.js, ./~/request/lib/har.js
* net in ./~/firebase-admin/~/faye-websocket/lib/faye/websocket/client.js, ./~/forever-agent/index.js and 3 others
* tls in ./~/firebase-admin/~/faye-websocket/lib/faye/websocket/client.js, ./~/forever-agent/index.js and 1 other
* dns in ./~/firebase-admin/~/isemail/lib/isemail.js
To install them, you can run: npm install --save fs net tls dns
我尝试了别名webpack.mix.js
但没有运气
mix.webpackConfig({
resolve: {
alias: {
'firebase-admin': path.resolve(__dirname, './node_modules/firebase-admin')
}
}
});
我也尝试过这样做,但也没有运气
mix.webpackConfig({
plugins: [
new webpack.LoaderOptionsPlugin({
options: {
includePaths: [
path.resolve(__dirname, './node_modules/firebase-admin/')
]
}
})
]
});