Module not found when using @babel in a next serverless function
I want to transpile submitted code with babel in a node serverless env and I have installed/reinstalled the packages numerous times and have messed around with .babelrc and next.config.js trying to get this to work. For some reason it seems like the serverless env isnt able to find the deps in the projects node_modules even though they are installed. Does anyone know why this would happen?
![No description](https://cdn.answeroverflow.com/1192618417199521832/image.png)
![No description](https://cdn.answeroverflow.com/1192618417505718293/image.png)
![No description](https://cdn.answeroverflow.com/1192618417950306416/image.png)
2 Replies
Hey Taylor - I haven't seen this before but could give these a try!
- Confirm that the plugin is in your
node_modules
folder and that it actually installed successfully
- Try a clean install npm ci
They are definitely in my node_modules and have tried npm ci. I also get a lot of errors in my console like this. Ive done some googling about the require.extensions not being supported by webpack but I dont know much about this stuff and havent been able to figure out how to get it working
![No description](https://cdn.answeroverflow.com/1192645012626882671/image.png)