question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find name 'Symbol'

See original GitHub issue
C:\node_apps\socket-io-typescript-chat\server>gulp build
[11:31:37] Using gulpfile C:\node_apps\socket-io-typescript-chat\server\gulpfile
.js
[11:31:37] Starting 'build'...
Compiler option 'compileOnSave' requires a value of type boolean.
C:/node_apps/socket-io-typescript-chat/server/node_modules/@types/node/index.d.t
s(6903,88): error TS2304: Cannot find name 'Symbol'.
[11:31:39] TypeScript: 1 semantic error
[11:31:39] TypeScript: emit succeeded (with errors)
[11:31:39] Finished 'build' after 1.89 s

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dianjvmcommented, Apr 5, 2019

Just Change the Lib on tsconfig.json Before : { "files": [ "src/*.ts", "src/model/*.ts" ], "compilerOptions": { "noImplicitAny": true, "target": "es5" } }

After : { "files": [ "src/*.ts", "src/model/*.ts" ], "compilerOptions": { "noImplicitAny": true, "target": "es5", "lib": ["es5", "es2015.symbol", "es2015.symbol.wellknown"] } }

i think this fixed the issue.

1reaction
SwapnilSoni1999commented, Feb 18, 2019

For a temp fix I have edited from Library | Symbol thing which I don’t remember now. But I just removed it and it got compiled and working fine. issue is its not in ES6 format and outdated right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find name 'Symbol' when compiling typescript
I'm receiving the following error when trying to compile a ts file: node_modules/@types/node/util.d.ts(121,88): error TS2304: Cannot find name ' ...
Read more >
[@types/node]: Cannot find name 'Symbol'. #25401 - GitHub
Since a couple of days, I am unable to build our typescript project due to the follwing error: /node_modules/@types/node/index.d.ts(6151,64): ...
Read more >
How to Resolve The Cannot Find Symbol Error in Java - Rollbar
The cannot find symbol error refers to a situation where the Java compiler is unable to find the symbol associated with a given...
Read more >
What Causes “Cannot find symbol” Compilation Error in Java?
As the name suggests, the Java cannot find symbol error occurs when a required symbol cannot be found in the symbol table.
Read more >
TypeScript error TS2304 cannot find name require - Edureka
The error that I'm getting is the "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found