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

Doesn't work in Webpack 5 / Next.js #289

Open
amannn opened this issue Aug 3, 2023 · 3 comments
Open

Doesn't work in Webpack 5 / Next.js #289

amannn opened this issue Aug 3, 2023 · 3 comments

Comments

@amannn
Copy link

amannn commented Aug 3, 2023

Describe the bug
A clear and concise description of what the bug is.

traverson can not be used in Webpack 5 (e.g. in Next.js 13).

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/amannn/next-traverson
  2. Install dependencies and run npm run dev

See error:

  x Legacy octal escape is not permitted in strict mode
    ,-[/Users/jan/Desktop/next-traverson/node_modules/.pnpm/minilog@3.1.0/node_modules/minilog/lib/node/formatters/npm.js:11:1]
 11 |         warn: '\033[30;41m' + 'WARN' + '\033[0m  ',
 12 |         error: '\033[31;40m' + 'ERR!' + '\033[0m  '
 13 |       };
 14 |   this.emit('item', (name ? '\033[37;40m'+ name +'\033[0m ' : '')
    :                              ^^
 15 |           + (level && out[level]? out[level] : '')
 16 |           + args.join(' '));
 17 | };
    `----

The minilog dependency is very outdated and not maintained anymore. Maybe it would make sense to remove it?

Expected behavior

traverson should work in Webpack 5 / Next.js.

Node.js (please complete the following information):

  • OS: macOS 13.3.1
  • Node.js version: v16.19.0
  • Traverson Version: 8.0.3

Additional context
Add any other context about the problem here.

@amannn
Copy link
Author

amannn commented Aug 3, 2023

I've also added an upstream bug report: mixu/minilog#47

@amannn
Copy link
Author

amannn commented Aug 3, 2023

Also, this warning is printed every time traverson is used in Next.js:

console.warn('Could not require jsonpath-plus, JSONPath support is not ' +
'available.');

Is it possible to just get rid of it?

@amannn amannn changed the title Doesn't work in Next.js Doesn't work in Webpack 5 / Next.js Aug 4, 2023
@amannn
Copy link
Author

amannn commented Nov 30, 2023

@basti1302 Any chance this could be addressed?

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

1 participant