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

Parsing error. #49

Closed
hshahbodaghkhan opened this issue Apr 23, 2020 · 2 comments
Closed

Parsing error. #49

hshahbodaghkhan opened this issue Apr 23, 2020 · 2 comments

Comments

@hshahbodaghkhan
Copy link

Hello.
when I use the library it give me the following error:

const opts = dashdash.parse({options: options});
^
TypeError: Cannot read property 'parse' of undefined
at Object. (C:\Users\Hossein\Documents\Automate_Marketing\examples\FirstExperiment.ts:30:23)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Module.m._compile (C:\Users\Hossein\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:836:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Object.require.extensions. [as .ts] (C:\Users\Hossein\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:839:12)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at main (C:\Users\Hossein\AppData\Roaming\npm\node_modules\ts-node\src\bin.ts:226:14)
at Object. (C:\Users\Hossein\AppData\Roaming\npm\node_modules\ts-node\src\bin.ts:485:3)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47

I use the library successfully before.
what is the problem?

@karfau
Copy link

karfau commented Apr 23, 2020

Your stacktrace tells you that the problem is in your code, not in this library:

const opts = dashdash.parse({options: options});
^
TypeError: Cannot read property 'parse' of undefined
at Object. (C:\Users\Hossein\Documents\Automate_Marketing\examples\FirstExperiment.ts:30:23)

@trentm
Copy link
Owner

trentm commented Sep 25, 2020

We'd need to see some or all of FirstExperiment.ts to attempt to help. It is possible this has issues with commonjs modules and/or TypeScript usage. I haven't worked with those much.

@trentm trentm closed this as completed Sep 25, 2020
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

No branches or pull requests

3 participants