-
Notifications
You must be signed in to change notification settings - Fork 14
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
Not able to start when add next-logger #6
Comments
When i use the same in Alpine Linux Container it works like expected |
Thanks for raising this - I don't develop natively on Windows (always through WSL or macOS), so I hadn't run into it before. To rule out interference from set NODE_OPTIONS="-r next-logger"
npx next start
# ...or whichever script you have aliases to "next start"
# e.g. npm run start |
When i set NODE_OPTIONS directly then it works as expected. Maybe there is a Problem with cross-env ... but can´t find out what it is ... the other env variables working fine with the cross-env |
I'm also interested in using this to develop on Windows without having to ask my team to manually set config vars. Happy to help test if you have ideas. |
@cahaseler - the library needs to be loaded into the Node environment before any other code, including Next.js. The fastest way is to use Alternatively, you could write a tiny script that requires require('next-logger')
require('next/dist/bin/next') node next.js |
This seems to be an issue with cross-env: #143, #248. PS: I've just fixed this in my library laggingreflex/win-node-env#8 which is an alternative to cross-env. |
I'm going to close this, as an issue with |
When i add next-logger to my Project im not able to start nextjs anymore:
Used Versions:
"next": "^11.1.2",
"next-logger": "^2.1.1",
OS:
Windows for dev and later Alpine Linux Kubernetes Container
What do im wrong?
The text was updated successfully, but these errors were encountered: