Build error when I tried to import SimpleWebAuthn server
See original GitHub issueHi, I am trying to import SimpleWebAuthn to my typescript project. After import it with npm, I got error as on the attached image.
npm install @simplewebauthn/server
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @simplewebauthn/server@0.10.3
added 32 packages from 28 contributors and audited 684 packages in 4.951s
found 179 vulnerabilities (123 low, 1 moderate, 54 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
phoebe@watsoncao-X570-UD:~/cybersec/clean-starter/app$ npm run build
> clean-starter@1.0.0 build /home/phoebe/cybersec/clean-starter/app
> tsc
node_modules/@types/pvutils/index.d.ts:115:42 - error TS2304: Cannot find name 'BufferSource'.
115 function arrayBufferToString(buffer: BufferSource): string;
~~~~~~~~~~~~
Found 1 error.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! clean-starter@1.0.0 build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the clean-starter@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! /home/phoebe/.npm/_logs/2020-11-09T06_08_58_963Z-debug.log`
I just wonder if I did something wrong?
Thanks,
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What to do about `supportsWebAuthn()`... · Issue #114 - GitHub
It's likely not as simple as updating packages/browser/tsconfig.json to target ES5 instead of ES2018. Possible options I proposed included:.
Read more >Server - SimpleWebAuthn
import SimpleWebAuthnServer from '@simplewebauthn/server'; ... try { verification = await verifyRegistrationResponse({ credential: body, expectedChallenge,
Read more >@simplewebauthn/server - npm
Start using @simplewebauthn/server in your project by running ... There are 3 other projects in the npm registry using @simplewebauthn/server.
Read more >Build failed to compile - Attempted import error - Stack Overflow
This error only appears when I try to build for production (npm run build). Here is the way I import my modules: import...
Read more >Build your first WebAuthn app - Google Developers
Note: This codelab doesn't teach you how to build a FIDO server. It uses SimpleWebAuthn, but it doesn't mean that you verified its ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes, you are right. The error went away with latest Nodejs. Thank you, I will close this issue.
FYI: I just realized that the error was not caused by Nodejs version. It is actually from the difference on tsconfig.json. I ignored the global variable from lib.dom.ts (es6) on tsconfig.json while lots of your code depends on this file.