Cloudinary:process.versions.node 未定义
Cloudinary: process.versions.node is undefined
我的 React 操作的设置类似于 https://github.com/zeit/next.js/issues/1501#issuecomment-289308498:
import axios from 'axios';
import { GET_BOOKS, GET_BOOK, BOOKS_LOADING, BOOK_LOADING, DELETE_BOOK, GET_ERRORS } from './types';
import cloudinary from 'cloudinary';
cloudinary.config({
cloud_name: '**********',
api_key: '***********',
api_secret: '*********'
});
添加 cloudinary
包后,webpack 报告缺少 fs
模块,类似于上面链接的问题。它已修复
node: {
fs: 'empty'
},
在webpack.dev.config.js
。
由此产生的另一个问题是 process.versions.node is undefined
。我该如何解决?
好像你安装了节点SDK“cloudinary”,如果你只需要JS,你应该安装“cloudinary-core”,如果你需要React SDK,你应该安装“cloudinary-react”。
--亚基尔
我的 React 操作的设置类似于 https://github.com/zeit/next.js/issues/1501#issuecomment-289308498:
import axios from 'axios';
import { GET_BOOKS, GET_BOOK, BOOKS_LOADING, BOOK_LOADING, DELETE_BOOK, GET_ERRORS } from './types';
import cloudinary from 'cloudinary';
cloudinary.config({
cloud_name: '**********',
api_key: '***********',
api_secret: '*********'
});
添加 cloudinary
包后,webpack 报告缺少 fs
模块,类似于上面链接的问题。它已修复
node: {
fs: 'empty'
},
在webpack.dev.config.js
。
由此产生的另一个问题是 process.versions.node is undefined
。我该如何解决?
好像你安装了节点SDK“cloudinary”,如果你只需要JS,你应该安装“cloudinary-core”,如果你需要React SDK,你应该安装“cloudinary-react”。
--亚基尔