Working with a node repl and tryihng this:
process.chdri('M://source/MySite')
let queries = await import('./src/graphql/queries.js')
Result is this:
export const getCompanySingleTable = /* GraphQL */ `
^^^^^^
Uncaught SyntaxError: Unexpected token 'export'
In ‘M://source/MySite/’ there is a package.json
that contains the line:
"type": "module",
I’m guessing the error is occurring because the package.json isn’t being read as the closest one. This raises the question,
When in package.json loaded?
Is it looked for when my repl is started? Is it looked for when when I try the dynamic import?