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

Verion 6.0.2 - Cannot use 'import.meta' outside a module #842

Closed
Tagliari opened this issue Apr 3, 2024 · 1 comment · Fixed by #843
Closed

Verion 6.0.2 - Cannot use 'import.meta' outside a module #842

Tagliari opened this issue Apr 3, 2024 · 1 comment · Fixed by #843
Assignees
Labels
bug Something isn't working

Comments

@Tagliari
Copy link

Tagliari commented Apr 3, 2024

Describe the bug

We have a bunch of applications with dependencies with "http-cookie-agent", and today we got several problems and difficulty identifying the reason.

I saw that you have a new version "http-cookie-agent": "6.0.2" and we rollback to 6.0.1 and now, everything works well.

Please check what happened below:

app[web.1]: > node dist/server.js
app[web.1]:
app[web.1]: /node_modules/http-cookie-agent/dist/utils/create_cookie_header_value.js:9
app[web.1]: const _require = 'require' in globalThis ? globalThis.require : (0, _nodeModule.createRequire)(import.meta.url);
app[web.1]: ^^^^
app[web.1]:
app[web.1]: SyntaxError: Cannot use 'import.meta' outside a module
app[web.1]: at internalCompileFunction (node:internal/vm:128:18)
app[web.1]: at wrapSafe (node:internal/modules/cjs/loader:1279:20)
app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1331:27)
app[web.1]: at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
app[web.1]: at Module.load (node:internal/modules/cjs/loader:1205:32)
app[web.1]: at Module._load (node:internal/modules/cjs/loader:1021:12)
app[web.1]: at Module.require (node:internal/modules/cjs/loader:1230:19)
app[web.1]: at require (node:internal/modules/helpers:179:18)
app[web.1]: at Object. (/node_modules/http-cookie-agent/dist/http/create_cookie_agent.js:8:35)
app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1368:14)
app[web.1]:
app[web.1]: Node.js v21.7.1

@3846masa
Copy link
Owner

3846masa commented Apr 4, 2024

Thanks for reporting. Issue was fixed by v6.0.3.

3846masa pushed a commit that referenced this issue Apr 4, 2024
## [6.0.3](v6.0.2...v6.0.3) (2024-04-04)

### Bug Fixes

* remove createRequire code to generate commonjs ([#843](#843)) ([5a32bf1](5a32bf1)), closes [#840](#840) [#842](#842)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants