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

bug: running the command after oclif simple, npm link gives errors #161

Closed
alber70g opened this issue Aug 29, 2018 · 1 comment
Closed

Comments

@alber70g
Copy link

Bug

Current behavior

After running the generator and trying to use this, I get a variety of errors.

Expected behavior

returning hello world.

Below there's the list of commands.

└─<>──» oclif single test-oclif                                                                             0 < 12:21:58
/bin/sh: yarn: command not found

     _-----_     ╭──────────────────────────╮
    |       |    │      Time to build a     │
    |--(o)--|    │  single-command CLI with │
   `---------´   │  oclif! Version: 1.11.4  │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? npm package name test-oclif
? command bin name the CLI will export test-oclif
? description
? author Albert Groothedde (xj19re)
? version 0.0.0
? license MIT
? node version supported >=8.0.0
? github owner of repository (https://github.com/OWNER/repo) ing
? github name of repository (https://github.com/owner/REPO) test-oclif
? optional components to include mocha (testing framework), circleci (continuous integration/delivery service), appveyor
 (continuous integration/delivery service), codecov (online code coverage report viewer), typescript (static typing for
javascript), tslint (static analysis tool for typescript)
   create package.json
   create .circleci/config.yml
   create tslint.json
   create tsconfig.json
   create test/tsconfig.json
   create .nycrc
   create test/helpers/init.js
   create test/mocha.opts
   create .editorconfig
   create .circleci/greenkeeper
   create appveyor.yml
   create README.md
   create .gitattributes
   create .gitignore
   create bin/run
   create bin/run.cmd
   create src/index.ts
   create test/index.test.ts
npm notice created a lockfile as package-lock.json. You should commit this file.
+ @types/chai@4.1.4
+ @types/mocha@5.2.5
+ @oclif/tslint@1.1.2
+ ts-node@7.0.1
+ @types/node@10.9.3
+ typescript@3.0.1
+ tslint@5.11.0
+ chai@4.1.2
+ mocha@5.2.0
+ nyc@12.0.2
+ @oclif/test@1.2.0
added 372 packages from 680 contributors and audited 2335 packages in 7.731s
found 0 vulnerabilities

+ @oclif/plugin-help@2.1.0
+ @oclif/command@1.5.0
+ @oclif/config@1.7.2
+ tslib@1.9.3
added 19 packages from 11 contributors, updated 1 package and audited 2431 packages in 2.551s
found 0 vulnerabilities


Created test-oclif in /Users/xj19re/projects/ing/test-oclif

└─<>──» cd test-oclif/                                                                                      0 < 12:45:31

└─<>──» ./bin/run                                                                                           0 < 12:45:36
hello world from ./src/index.ts

└─<>──» npm link                                                                                            0 < 12:45:45

> test-oclif@0.0.0 prepare /Users/xj19re/projects/ing/test-oclif
> rm -rf lib && tsc

audited 2431 packages in 4.42s
found 0 vulnerabilities

/usr/local/bin/test-oclif -> /usr/local/lib/node_modules/test-oclif/bin/run
/usr/local/lib/node_modules/test-oclif -> /Users/xj19re/projects/ing/test-oclif

└─<>──» test-oclif                                                                                          0 < 12:46:03
hello world from ./src/index.ts

└─<>──» ..                                                                                                  0 < 12:48:42

└─<>──» test-oclif                                                                                          0 < 12:48:45

/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:261
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
error TS2468: Cannot find global value 'Promise'.
test-oclif/src/index.ts(18,9): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.

    at createTSError (/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:261:12)
    at getOutput (/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:367:40)
    at Object.compile (/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:558:11)
    at Module.m._compile (/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:439:43)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/xj19re/projects/ing/test-oclif/node_modules/ts-node/src/index.ts:442:12)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)


└─<>──» npm version                                                                                          0 < 12:49:29
{ npm: '6.2.0',
  ares: '1.10.1-DEV',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.11.4',
  openssl: '1.0.2p',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }

└─<>──» sw_vers                                                                                              0 < 12:54:37
ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G1510
@jdx jdx closed this as completed in 3ec87bc Aug 29, 2018
oclif-bot added a commit to oclif/example-single-js that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit to oclif/example-single-ts that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit to oclif/example-plugin-js that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit to oclif/example-plugin-ts that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit to oclif/example-multi-js that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit to oclif/example-multi-ts that referenced this issue Aug 29, 2018
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif/oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif/oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif/oclif@3ec87bc)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif/oclif@0c2aa20))
oclif-bot added a commit that referenced this issue Aug 29, 2018
## [1.11.5](v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](a69c4be))
* hide yarn output when not found ([a3897b1](a3897b1))
* set project path for single CLIs ([3ec87bc](3ec87bc)), closes [#161](#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](0c2aa20))
@oclif-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.11.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

JaeBradle pushed a commit to JaeBradle/oclif that referenced this issue Oct 19, 2022
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([9493904](oclif/oclif@9493904))
* hide yarn output when not found ([0039f9f](oclif/oclif@0039f9f))
* set project path for single CLIs ([929c870](oclif/oclif@929c870)), closes [#161](oclif/oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([369061d](oclif/oclif@369061d))
gaelmotte pushed a commit to gaelmotte/oclif that referenced this issue Oct 24, 2022
gaelmotte pushed a commit to gaelmotte/oclif that referenced this issue Oct 24, 2022
## [1.11.5](oclif/oclif@v1.11.4...v1.11.5) (2018-08-29)

### Bug Fixes

* fixpack -> [@oclif](https://github.com/oclif)/fixpack ([a69c4be](oclif@a69c4be))
* hide yarn output when not found ([a3897b1](oclif@a3897b1))
* set project path for single CLIs ([3ec87bc](oclif@3ec87bc)), closes [oclif#161](oclif#161)
* use [@oclif](https://github.com/oclif)/fixpack to fix audit warning ([0c2aa20](oclif@0c2aa20))
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

2 participants