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

npm run rewrite fails #40

Closed
fergald opened this issue Aug 15, 2019 · 2 comments · Fixed by #53
Closed

npm run rewrite fails #40

fergald opened this issue Aug 15, 2019 · 2 comments · Fixed by #53

Comments

@fergald
Copy link
Collaborator

fergald commented Aug 15, 2019

Every attempt to run this on a very simple input file fails. It seems like it was broken by e35be3c.

$@ npm run rewrite test2.js

> [email protected] rewrite /home/fergal/github/jackbsteinberg/get-originals-rewriter
> jscodeshift -t ./lib/rewriter.js "test2.js"

Processing 1 files... 
Spawning 1 workers...
Sending 1 files to free worker...
/home/fergal/github/jackbsteinberg/get-originals-rewriter/node_modules/ts-morph/dist/codeBlockWriter/code-block-writer.js:13
tempThis["CodeBlockWriter"] = code_block_writer_1.default;
                            ^

TypeError: Cannot set property 'CodeBlockWriter' of undefined
    at Object.<anonymous> (/home/fergal/github/jackbsteinberg/get-originals-rewriter/node_modules/ts-morph/dist/codeBlockWriter/code-block-writer.js:8:1)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Module._compile (/home/fergal/github/jackbsteinberg/get-originals-rewriter/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Object.newLoader [as .js] (/home/fergal/github/jackbsteinberg/get-originals-rewriter/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
All done. 
Results: 
0 errors
0 unmodified
0 skipped
0 ok
Time elapsed: 1.338seconds 
@domenic
Copy link
Collaborator

domenic commented Aug 19, 2019

The best way to fix this is via #30.

@domenic
Copy link
Collaborator

domenic commented Aug 23, 2019

This was "fixed" by #40... but we kind of forgot to really fix it, so the party has moved to #52.

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

Successfully merging a pull request may close this issue.

2 participants