Skip to content
New issue

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

SyntaxError: pages/index.js: Unexpected token (1:145641) #21

Open
rayhooker opened this issue Sep 6, 2017 · 0 comments
Open

SyntaxError: pages/index.js: Unexpected token (1:145641) #21

rayhooker opened this issue Sep 6, 2017 · 0 comments

Comments

@rayhooker
Copy link

rayhooker commented Sep 6, 2017

I have tested the code with a simple SVG and it works. Apparently there is an issue my selected more complex SVG that includes imbedded Javascript in a CDATA. It gives the error message:

SyntaxError: pages/index.js: Unexpected token (1:145641)

I am unable to debug it because it give only the location and not details of the "Unexpected token". Is there a way that I can debug this.

..a bit more info though still no indication of what caused the problem

1 | import React from 'react';
| ^
2 | import NcMap from '../static/images/nc_map.svg';
3 | import Head from 'next/head';
4 | import Link from 'next/link';

Error
at transpile (/Users/.....reportSelectorServer/node_modules/babel-loader/lib/index.js:67:13)
at /Users/.....reportSelectorServer/node_modules/babel-loader/lib/fs-cache.js:118:18
at ReadFileContext.callback (/Users/.....reportSelectorServer/node_modules/babel-loader/lib/fs-cache.js:31:21)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
@ multi ./pages?entry
at /Users/.....reportSelectorServer/node_modules/next/dist/server/build/index.js:182:21
at emitRecords.err (/Users/.....reportSelectorServer/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/Users/.....reportSelectorServer/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/Users/.....reportSelectorServer/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/Users/.....reportSelectorServer/node_modules/webpack/lib/Compiler.js:368:12)
at next (/Users/.....reportSelectorServer/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Users/.....reportSelectorServer/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Users/.....reportSelectorServer/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/Users/.....reportSelectorServer/node_modules/webpack/lib/Compiler.js:365:9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant