We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The import statement should successfully import the JSON file.
A "SyntaxError" is thrown.
import data from './data.json' with { type: 'json' };
{ "type": "SyntaxError", "message": "Unexpected token (1:818) at SyntaxError: Unexpected token (1:818)", "stack": SyntaxError: Unexpected token (1:818) at pp$4.raise (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:3586:15) at pp$9.unexpected (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:772:10) at pp$9.semicolon (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:749:68) at Parser.parseImport (/Users/inaiat/app/node_modules/.pnpm/[email protected][email protected]/node_modules/acorn-import-attributes/lib/index.js:242:12) at pp$8.parseStatement (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:948:51) at pp$8.parseTopLevel (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:829:23) at Parser.parse (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:601:17) at Function.parse (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:651:37) at getEsmExports (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/get-esm-exports.js:37:23) at getExports (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/get-exports.js:73:12) "pos": 818, "loc": { "line": 1, "column": 818 }, "raisedAt": 822 }
The text was updated successfully, but these errors were encountered:
This was fixed by #104
Sorry, something went wrong.
@timfish Thanks!
This is a duplicate of #105 but #104 does help work around the issue
No branches or pull requests
Expected Behavior
The import statement should successfully import the JSON file.
Actual Behavior
A "SyntaxError" is thrown.
Steps to Reproduce the Problem
import data from './data.json' with { type: 'json' };
{ "type": "SyntaxError", "message": "Unexpected token (1:818) at SyntaxError: Unexpected token (1:818)", "stack": SyntaxError: Unexpected token (1:818) at pp$4.raise (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:3586:15) at pp$9.unexpected (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:772:10) at pp$9.semicolon (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:749:68) at Parser.parseImport (/Users/inaiat/app/node_modules/.pnpm/[email protected][email protected]/node_modules/acorn-import-attributes/lib/index.js:242:12) at pp$8.parseStatement (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:948:51) at pp$8.parseTopLevel (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:829:23) at Parser.parse (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:601:17) at Function.parse (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/acorn/dist/acorn.js:651:37) at getEsmExports (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/get-esm-exports.js:37:23) at getExports (/Users/inaiat/app/node_modules/.pnpm/[email protected]/node_modules/import-in-the-middle/lib/get-exports.js:73:12) "pos": 818, "loc": { "line": 1, "column": 818 }, "raisedAt": 822 }
Specifications
The text was updated successfully, but these errors were encountered: