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

Unable to build #71

Closed
YuryStrozhevsky opened this issue Jan 4, 2020 · 2 comments
Closed

Unable to build #71

YuryStrozhevsky opened this issue Jan 4, 2020 · 2 comments

Comments

@YuryStrozhevsky
Copy link
Contributor

On Windows 10, fresh copy from GitHub:

D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master>npm run build

> webcrypto-liner@1.1.2 build D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master
> rollup -c


src/lib.ts → build/index.js, build/index.es.js...
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src\init.ts (3:28)
1: import { nativeSubtle } from "./native";
2:
3: function WrapFunction(subtle: any, name: string) {
                               ^
4:     const fn = subtle[name];
5:     // tslint:disable-next-line:only-arrow-functions
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
    at error (D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master\node_modules\rollup\dist\rollup.js:5365:30)
    at Module.error (D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master\node_modules\rollup\dist\rollup.js:9708:9)
    at tryParse (D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master\node_modules\rollup\dist\rollup.js:9617:16)
    at Module.setSource (D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master\node_modules\rollup\dist\rollup.js:9935:33)
    at Promise.resolve.catch.then.then.then (D:\Downloads\webcrypto-liner-master (8)\webcrypto-liner-master\node_modules\rollup\dist\rollup.js:12205:20)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webcrypto-liner@1.1.2 build: `rollup -c`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webcrypto-liner@1.1.2 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!     C:\Users\y-str\AppData\Roaming\npm-cache\_logs\2020-01-04T10_21_13_366Z-debug.log

And I do recommend to make a real build checking on TravisCI: even if there is a badge build: passed at the moment TravisCI does not check build, only coverage.

@microshine
Copy link
Contributor

@YuryStrozhevsky Travis CI uses prepare script which compiles source code

https://travis-ci.org/PeculiarVentures/webcrypto-liner/jobs/627175272#L248

Maybe the problem is in tslint version

@YuryStrozhevsky
Copy link
Contributor Author

The problem was due to this issue. In short - full path to the project which is using rollup-plugin-typescript2 MUST not contain any parentheses.

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

2 participants