Closed chrisekelley closed 3 years ago
If I change my import to
import Get from 'tangy-form';
I get the following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
'/home/ubuntu/pouchdb-couchdb-transform-cli/node_modules/tangy-form/tangy-form-response-model'
imported from /home/ubuntu/pouchdb-couchdb-transform-cli/node_modules/tangy-form/helpers.js\n" +
I see how adding .js to imports within tangy-form could confuse the ts interpreter - but maybe the --es-module-specifier-resolution=node
switch as commented upon in this answer might help.
This comment further illustrates the issue and solution I tried - which worked (adding .js to imports) but I still wonder how this will work in Tangerine client.
2 things to do:
"type": "module"
to package.jsonIn the pouchdb-couchdb-transform-cli add-dryRun-and-console-output branch, when running a script it is unable to find imports from tangy-form. Specifically, my version of the cli is importing helpers.js.
for example: node_modules/tangy-form/helpers.js and change
import { TangyFormResponseModel } from './tangy-form-response-model'
toimport { TangyFormResponseModel } from './tangy-form-response-model.js'
But will this make tangy-form lib not work in non-node apps like Tangerine client?
In run-batch-es6 i'm importing helpers.js like this: