logger
logger copied to clipboard
Can't resolve 'process/browser' in ...\node_modules\forest'
Try to start project and gott error:
"Module not found: Error: Can't resolve 'process/browser' in 'C:\Users\20074894\WebstormProjects\project\node_modules\forest' Did you mean 'browser.js'?"
Also I tried add Webpack plugins:
new webpack.ProvidePlugin({
process: "process/browser",
}),
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
})
But have not luck((
@KirillYoYo Thank you for reporting.
Can you print environment (browser/nodejs/deno/etc.) you building for, versions of effector, forest, webpack, and something else to help us reproducing issue.
Or, it will be better if you create a reproduce by yourself on codesandbox, playcode or something else.
Sorry, my webpack:
const path = require('path');
const webpack = require('webpack');
const Circular = require('circular-dependency-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const devServerPort = 9000;
const operatorServerPort = 9081;
const mockServerPort = 31337;
module.exports = ({stage = 'development', port = 'mock'}) =>
console.log(`Stage: ${stage}, Port: ${port}`) || {
mode: stage,
entry: [
'./source',
],
output: {
path: path.resolve(__dirname, './out'),
filename: stage === 'production' ? '[chunkhash].js' : '[name]_[chunkhash].js',
publicPath: './'
},
devtool: false,
resolve: {
fallback: {
path: require.resolve('path-browserify')
},
modules: ['source', 'node_modules'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
optimization: {
splitChunks: {
chunks: 'all',
minSize: 100000,
maxSize: 350000
}
},
performance: {
hints: false
},
devServer: {
publicPath: '/',
hot: true,
historyApiFallback: true,
clientLogLevel: 'debug',
contentBase: './out',
port: devServerPort
},
target: 'web',
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
favicon: './source/assets/favicon.ico'
}),
new webpack.DefinePlugin({
'process.env.STAGE': JSON.stringify(stage)
}),
new webpack.ProvidePlugin({
process: 'process/browser'
})
],
module: {
rules: [
{
test: /\.([tj])sx?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader'
}
]
},
{
test: /\.(mp3|otf|png|svg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name]_[contenthash].[ext]',
outputPath: 'assets',
esModule: false
}
}
]
},
{
test: /\.(pdf|xlsx)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets',
esModule: false
}
}
]
}
]
}
};
packages:
"devDependencies": {
"@babel/core": "7.11.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.10.4",
"@babel/plugin-proposal-optional-chaining": "7.11.0",
"@babel/plugin-transform-runtime": "7.11.5",
"@babel/preset-env": "7.11.5",
"@babel/preset-react": "7.10.4",
"@babel/preset-typescript": "7.10.4",
"@babel/runtime": "7.11.2",
"@types/history": "4.7.8",
"@types/react": "16.9.52",
"@types/react-dom": "16.9.8",
"@types/styled-components": "5.1.4",
"@types/uuid": "3.4.6",
"@types/react-input-mask": "3.0.1",
"@typescript-eslint/eslint-plugin": "4.4.0",
"@typescript-eslint/parser": "4.4.0",
"archiver": "3.0.0",
"babel": "6.23.0",
"babel-loader": "8.1.0",
"babel-plugin-styled-components": "1.11.1",
"circular-dependency-plugin": "5.2.0",
"clean-webpack-plugin": "3.0.0",
"eslint": "7.11.0",
"eslint-config-airbnb": "18.2.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.3.1",
"eslint-plugin-react": "7.21.4",
"eslint-plugin-react-hooks": "4.1.2",
"file-loader": "6.1.1",
"html-webpack-plugin": "4.5.0",
"http-proxy-middleware": "^0.19.1",
"husky": "4.3.0",
"prettier": "2.1.2",
"ts-loader": "8.0.5",
"typescript": "4.1.2",
"webpack": "5.4.0",
"webpack-bundle-analyzer": "3.9.0",
"webpack-cli": "4.5.0",
"webpack-dev-server": "3.11.0",
"react-input-mask": "2.0.4"
},
same issue
Hello!
As of the recent '0.14.0' release, 'effector-logger' no longer includes 'effector-inspector' and integration with redux-devtools, so all related issues are gone.
This issue was related to the inspector internals
See the release notes for details https://github.com/effector/logger/releases/tag/v0.14.0