Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

shim$1.Parser.looksLikeNumber is not a function #99

Closed
brandonros opened this issue Jun 28, 2021 · 6 comments
Closed

shim$1.Parser.looksLikeNumber is not a function #99

brandonros opened this issue Jun 28, 2021 · 6 comments

Comments

@brandonros
Copy link


$ TS_NODE_FILES=true NODE_PATH=./ JASMINE_CONFIG_PATH=./test/jasmine.unit.json nyc jasmine-ts "test/unit/**/*.spec.ts"

/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/node_modules/yargs/build/index.cjs:2804

            if (shim$1.Parser.looksLikeNumber(arg) &&

                              ^



TypeError: shim$1.Parser.looksLikeNumber is not a function

    at Object.Yargs.self._parsePositionalNumbers (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/node_modules/yargs/build/index.cjs:2804:31)

    at Object.Yargs.self._postProcess (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/node_modules/yargs/build/index.cjs:2787:25)

    at Object.parseArgs [as _parseArgs] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/node_modules/yargs/build/index.cjs:2774:21)

    at Object.get [as argv] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/node_modules/yargs/build/index.cjs:2651:25)

    at Object.<anonymous> (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/lib/index.js:103:5)

    at Module._compile (internal/modules/cjs/loader.js:1063:30)

    at Module.replacementCompile (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/append-transform/index.js:58:13)

    at module.exports (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/default-require-extensions/js.js:8:9)

    at Object.<anonymous> (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/append-transform/index.js:62:4)

    at Module.load (internal/modules/cjs/loader.js:928:32)
jasmine-ts@^0.3.0:
  version "0.3.3"
  resolved "https://registry.yarnpkg.com/jasmine-ts/-/jasmine-ts-0.3.3.tgz#a26990b53379c94df706add15887593f40032974"
  integrity sha512-ISBmhSe1imdT2V3u681YgIIlpnt68dhdu8l94JeWfL4sYE67bfoHj2Coc1k1ND3u+DxQcHMTn8nCZ7Pr3dV6TQ==
  dependencies:
    yargs "^16.2.0"
@brandonros
Copy link
Author

didn't notice you did 0.4.0 recently, checking if #93 fixed it as we speak

@brandonros
Copy link
Author

TypeError: O(...).Parser.looksLikeNumber is not a function

    at Bt.[parsePositionalNumbers] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/yargs/build/index.cjs:1:42740)

    at Bt.[postProcess] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/yargs/build/index.cjs:1:45494)

    at Bt.[runYargsParserAndExecuteCommands] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/yargs/build/index.cjs:1:53635)

    at Bt.parse (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/yargs/build/index.cjs:1:36100)

    at Bt.get [as argv] (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/yargs/build/index.cjs:1:55639)

    at Object.<anonymous> (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/jasmine-ts/lib/index.js:125:5)

    at Module._compile (internal/modules/cjs/loader.js:1063:30)

    at Module.replacementCompile (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/append-transform/index.js:58:13)

    at module.exports (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/default-require-extensions/js.js:8:9)

    at Object.<anonymous> (/****/workspace/node-consumer-login-proxy_PR-581/node_modules/nyc/node_modules/append-transform/index.js:62:4)

no

yargs/yargs-parser#324

you need https://github.com/yargs/yargs-parser/blob/main/CHANGELOG.md#2020-2020-09-21 this to get that exported?

@brandonros
Copy link
Author

jasmine-ts@^0.4.0:
  version "0.4.0"
  resolved "https://registry.yarnpkg.com/jasmine-ts/-/jasmine-ts-0.4.0.tgz#b228c450cb70471344ce154c0e47d2f588f4a479"
  integrity sha512-bIAWJKUwxfuZfGI1ctEbny7+dsyFzsN0eLzOokxh0qIUCofai2WUEKoe3MMllkGEBXJzbEVYr2IyhJBv4j7SBA==
  dependencies:
    yargs "^17.0.1"

@ert78gb
Copy link
Collaborator

ert78gb commented Jul 2, 2021

I don't know what is the problem. Can you create a public simple repo with your setup?

@ert78gb
Copy link
Collaborator

ert78gb commented Oct 30, 2021

I close it because lack of answer

@ert78gb ert78gb closed this as completed Oct 30, 2021
@brayovsky
Copy link

I came across this and it was because the version of yargs-parser was not the version yargs expected. Adding yargs-parser with the correct version in package.json file resolutions can possibly solve this or any other way of enforcing the correct version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants