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

Invalid syntax error #68

Open
stanislav-polishchuk opened this issue May 22, 2019 · 0 comments
Open

Invalid syntax error #68

stanislav-polishchuk opened this issue May 22, 2019 · 0 comments

Comments

@stanislav-polishchuk
Copy link

Hello, wanted to use your library to cover the gaps of missing type check in the parcel. But unfortunately wasn't successful to run it at all.

when I run tsc -p . - I see no errors,
Same for parcel build ./src/index.html --no-cache (mainly because it didn't check for tsc errors)
But if I add your library and trying to build my project for the same command parcel build ./src/index.html --no-cache i see lots of error that look like parcel trying to analyze my code using some kind of really outdated ECMA standards

> parcel build ./src/index.html --no-cache

🚨  /Users/stanislav/workspace/mercury/services/frontend/cockpit/src/redux/store/index.tsx: SyntaxError: /Users/stanislav/workspace/mercury/services/frontend/cockpit/src/redux/store/index.tsx: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (5:8):

  3 | import { invoicesReducer, InvoicesState } from "../reducers";
  4 |
> 5 | export interface RootState {
    |        ^
  6 |   invoicesReducer: InvoicesState;
  7 | }
  8 |

Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.
    at Object.raise (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:3831:17)
    at Object.expectPlugin (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:5148:18)
    at Object.maybeParseExportDefaultSpecifier (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:8313:12)
    at Object.parseExport (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:8265:29)
    at Object.parseStatementContent (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:7347:27)
    at Object.parseStatement (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:7243:17)
    at Object.parseBlockOrModuleBlockBody (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:7810:25)
    at Object.parseBlockBody (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:7797:10)
    at Object.parseTopLevel (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:7181:10)
    at Object.parse (/Users/stanislav/workspace/mercury/services/frontend/cockpit/node_modules/parcel-bundler/node_modules/@babel/parser/lib/index.js:8660:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cockpit@1.0.0 build: `parcel build ./src/index.html --no-cache`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cockpit@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/stanislav/.npm/_logs/2019-05-22T13_47_07_358Z-debug.log

whether I'm doing something wrong?

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