`TS2354` error: `module 'tslib' cannot be found` -- use `moduleResolution: "node"`
See original GitHub issuetsconfig.json
{
"compilerOptions": {
"outDir": "dist",
"module": "es2015",
"target": "es2015"
},
"include": [
"src"
]
}
src/test.ts
export default async function hello() {
console.log('Hello world')
}
run rollup -c
Error:
Error: rpt2: rollup-example/src/test.ts (3,23): semantic error TS2354 This syntax requires an imported helper but module 'tslib' cannot be found.
but change to rollup-plugin-typescript
, run successful.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
"This syntax requires an imported helper but module 'tslib ...
This results in an error: src/index.ts:5:1 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.
Read more >TypeScript error “TS2354: This syntax requires an ... - GitHub
js:3:8 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found. 3 const {ArgumentParser} = require('argparse') ...
Read more >This syntax requires an imported helper but module 'tslib ...
To solve the error "This syntax requires an imported helper but module 'tslib' cannot be found", install tslib by running npm install -D...
Read more >this syntax requires an imported helper named '__spreadarray'
"This syntax requires an imported helper but module 'tslib' cannot be found" with ES2015 modules. Asked Oct 14, 2018 • 181 votes 19...
Read more >this syntax requires an imported helper but ... - Code Grepper
this syntax requires an imported helper but module 'tslib' cannot be found.ts(2354). Add Answer | View In TPC Matrix. Technical Problem Cluster First ......
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 FreeTop 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
Top GitHub Comments
Ah, I think you need
"moduleResolution": "node",
in yourtsconfig.json
.Duplicate of #12 / #14