nitro
nitro copied to clipboard
ERROR Rollup error: Cannot read properties of null (reading 'included')
Environment
Nitro: Latest Node: v16.14.2
Reproduction
Go to the Nitro Playground and Run nitro dev
Or check on Stackblitz: https://stackblitz.com/github/unjs/nitro/tree/main/examples/hello-world?file=package.json
Describe the bug
No index route is generated plus the error above is shown in the console
Additional context
No response
Logs
ERROR Rollup error: Cannot read properties of null (reading 'included') nitro 19:01:34
at Module.isIncluded (node_modules/rollup/dist/es/shared/rollup.js:12683:25)
at eval (node_modules/rollup/dist/es/shared/rollup.js:16138:17)
at Array.filter (<anonymous>)
at getIncludedModules (node_modules/rollup/dist/es/shared/rollup.js:16137:38)
at Bundle.generateChunks (node_modules/rollup/dist/es/shared/rollup.js:16083:40)
at async Bundle.generate (node_modules/rollup/dist/es/shared/rollup.js:15960:28)
at async eval (node_modules/rollup/dist/es/shared/rollup.js:23682:27)
at async catchUnfinishedHookActions (node_modules/rollup/dist/es/shared/rollup.js:23041:20)
at async Promise.all (index 0)
at async Task.run (node_modules/rollup/dist/es/shared/watch.js:4958:32)
I have the same issue.
What I notice is that if I make a change to a file and save it, then the server works fine. But it seems to error out on first run. Any ideas?
Same error here. Using pnpm.
this seems to be working now with the latest version of nitro. kind of weird
@vencho-mdp this is still happening to me
@darklight9811 Hi! Do you have a reproduction?
@vencho-mdp I believe it may be an issue with node version used, in my case:
- create routes/index.ts exporting
export default () => "hi"
- yarn init
- yarn add nitropack
- add a script to run nitropack
- run it
My node version was 18.4.0
What happens if you set your node version to 16.x?
@vencho-mdp 16.10.0 breaks, 16.13.1 works. Yeah, that makes sense since it says we need ^16.11.0, but it also says ^18 should work