Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace option not working as-intended #799

Open
kylemh opened this issue May 25, 2021 · 6 comments
Open

trace option not working as-intended #799

kylemh opened this issue May 25, 2021 · 6 comments

Comments

@kylemh
Copy link

kylemh commented May 25, 2021

I use Next.js and Redux without next-redux-wrapper (only ever creating and using my store on the client).

I see in other examples that trace is supposed to supply source code and correct line numbers. For me, I see the following, uninteractive text:

Screen Shot 2021-05-25 at 9 16 52 AM

If anybody has any ideas, I'm desperately in need of the ability to trace these actions!

Store Init Code ```tsx import { configureStore } from '@reduxjs/toolkit'; import LogRocket from 'logrocket'; import { Store } from 'redux'; import createSagaMiddleware, { Task } from 'redux-saga'; import { createRouterMiddleware, initialRouterState } from 'connected-next-router'; import { NextRouter } from 'next/router'; import thunk from 'redux-thunk'; import { previousRouteMiddleware } from './previousRouteMiddleware'; import createRootReducer from './rootReducer'; import rootSagas from './sagas';

export interface SagaStore extends Store {
sagaTask?: Task;
}

let globalStore: any = null;

export const makeStore = (router: NextRouter) => {
if (globalStore) {
return globalStore;
}

const sagaMiddleware = createSagaMiddleware();

const store = configureStore({
reducer: createRootReducer(),
middleware: [thunk, createRouterMiddleware(), previousRouteMiddleware, sagaMiddleware, LogRocket.reduxMiddleware()],
preloadedState: {
router: initialRouterState(router.asPath),
},
devTools: {
trace: true,
traceLimit: 10,
},
});

(store as SagaStore).sagaTask = sagaMiddleware.run(rootSagas);

globalStore = { store };
return globalStore;
};


</details>
@mark-night
Copy link

You might want to try setting webpack config devtool option to 'source-map' as explained in the doc.

@kylemh
Copy link
Author

kylemh commented Jun 4, 2021

This isn't an option for me as a Next.js user: https://github.com/vercel/next.js/blob/0af3b526408bae26d6b3f8cab75c4229998bf7cb/errors/improper-devtool.md

@mossa-Sammer
Copy link

@kylemh did you find a solution for it?

@kylemh
Copy link
Author

kylemh commented Mar 17, 2022

No, I'm sorry.

@tarunislucky
Copy link

Hi you found any solution after two years ? Now i have same problem. Trace is coming. But source map is not.

@kylemh
Copy link
Author

kylemh commented Jan 11, 2024

Still no, but - most importantly - I'm not looking for one anymore 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants