Node breaks when switching branches ; Invalid or Unexpected Token #1471
Unanswered
gita-vahdatinia
asked this question in
Q&A
Replies: 2 comments
-
You're using an old version of ts-node. Does the issue occur with the latest version? Is there a reason you cannot upgrade? If so, is it possible for us to resolve this reason so that you can upgrade, perhaps via a bugfix or a new feature? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I upgraded to
Do I need to change something in the tsconfig file? I thought ts-node should ignore node-modules. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Search Terms
cjs-loader
Invalid or unexpected token
cache corruption
Expected Behavior
Not error out
Actual Behavior
Seemingly random get syntax error for unexpected or invalid token thrown by node coming from ts-node. It happens when I switch branches or do updates to node modules, hard to reproduce because it seemingly does not happen every time. I can resolve by wiping out ts-node cache or adding a space to that file will help resolve.
Here is stack call
Steps to reproduce the problem
Hard to reproduce since it is seemingly flakey.
Specifications
ts-node v7.0.1
node v14.17.6
typescript v4.4.3
cache "/Users/gita/code/coda/build/ts-node-cache/87243488a73d3353973082673ab4a19d1295ce03e37210783044f24f533dd39e"
MacOS 10.15.7
Beta Was this translation helpful? Give feedback.
All reactions