Closed waynevanson closed 5 years ago
Hmm that stack trace would make sense since require()
isn't available at runtime.
You'll see the request of a dependency is an expression
when webpack runs into a piece of code like require(someVar)
as it can't determine which module to bundle in at build time.
Maybe someone else can chime in? My guess is this is expected behavior.
@ianschmitz So that sounds like it makes sense. Running the latest prettier
version resolves this, but still has warnings. This means it will still run the dev sever and still build when running yarn build
.
I'm going to issue a pull request on this to the prettier team, as they said "PR Welcome".
So it looks like they've removed eval and if not, it's high on their list.
I'm going to close this, as there's nothing more to do. Thank you for having a look at it :)
Describe the bug
Webpack throws 2 types of errors when Prettier's
parser-glimmer
is required.Did you try recovering your dependencies?
Oath. I even made a fresh repository and we still came across the same error.
Which terms did you search for in User Guide?
require.extension
Environment
Wow, how nifty is this!
I have node installed via a snap package currently,
10.16.1
. I had this version and 12.x installed via.deb
package with the same bug.Steps to reproduce
prisma-client-lib
as a dependancyPRISMA
project.Import { prisma } from './[your/folder/of/choice/prisma-client'
prisma.[x]
in a react component, so it gets called at any point in time.Expected behavior
No error and the function alongside react should run smoothly.
Actual behavior
Screenshots
Terminal
Reproducible demo
https://github.com/waynevanson/cra-prettier-issue