Closed wojpawlik closed 3 years ago
This happens even if I comment out all the transformations: https://github.com/wojpawlik/deno2node/blob/3c9cf71a06a08d4c6db91ae4c4e0aeca40c30164/src/deno2node.ts#L26-L41
What am I doing wrong?
I'm not sure what the intent is here (didn't look too thoroughly), but after the module specifier is changed to "ts-morph"
, the TS compiler is then searching for the "ts-morph"
module, but it can't find it because npm install
was not run... so the module doesn't exist locally.
@wojpawlik yeah, I saw that, but are you creating a node.js build for this library using Deno? Anyway, the reason this is happening is because the module specifier is changed to "ts-morph", but I don't see npm install
happening anywhere before checking diagnostics.
@wojpawlik in other words, add npm install
as a command on your CI before running this script. The ts-morph npm dependency is not being pulled down.
I already did... 😕
Oh, sorry. I never heard of npm ci
and didn't know what it did (good to know about). I was just searching for npm install
.
Maybe try the suggestion of setting the module resolution to "node". Does this run locally?
Thank you, "moduleResolution": "node"
works 🤦♂️
@wojpawlik awesome. No problem!
@dsherret why does build fail (on Deno and Node.js) with
Cannot find module 'ts-morph'
even tho it is installed?https://github.com/wojpawlik/deno2node/blob/3c9cf71a06a08d4c6db91ae4c4e0aeca40c30164/src/deno2node.ts#L3 Changing to
from "ts-morph"
andskipLibCheck
don't help. Trying to import something else also fails.