我目前正在构建一个应用程序,并且正在尝试测试我使用Express创建的生产服务器环境.通过webpack-dev-server提供应用程序时,该应用程序运行正常,但当我的Express server.js由webpack捆绑并node server.bundle.js运行时,我收到有关Firebase存储的以下错误.
/Users/palcisto/Sites/sandbox/MTBparks/MTBparksMemberApp/server.bundle.js:533
var storage = _firebaseConfig2.default.storage();
^
TypeError: _firebaseConfig2.default.storage is not a function
Run Code Online (Sandbox Code Playgroud)
节点最终只是切换到运行我的开发环境.
下面是我package.json的依赖项和npm脚本,后面是我终端的日志.
我在'_firebaseConfig2.default.storage上所做的所有google/stackoverflow搜索都不是一个函数'.
的package.json
{
"name": "mtbparks-member-app",
"version": "0.1.0",
"main": "index.html",
"scripts": {
"start": "if-env NODE_ENV=production && npm run start:prod || npm run start:dev",
"start:dev": "webpack-dev-server --inline --content-base build/ --history-api-fallback && postcss --use autoprefixer -d build src/styles.css",
"start:prod": "npm run build && node server.bundle.js",
"build:client": "webpack && postcss --use autoprefixer -d build src/styles.css",
"build:server": "webpack --config webpack.server.config.js",
"build": "npm run …Run Code Online (Sandbox Code Playgroud)