Comments (4)
@wataruian I'm not seeing this happen on a newly generated CLI (either from the CJS template or the ESM template)
Can you create a simple repository that replicates the issue? It'd also be helpful if you provided the logs from setting the DEBUG=config:ts-node
environment variable. That should tell us why it's skipping the compilation step. Thanks!
from core.
I can't easily reproduce the repo since I am using a large monorepo, but for context:
I tried creating a new command that just do console.log()
and it works just fine.
But I am getting an issue when the command actually uses lodash
- isNil()
.
module: @oclif/[email protected]
task: cacheCommand
plugin: @wataruian/cli
root: /Users/wataruian/monorepo/packages/cli
See more details with DEBUG=*
TypeError Plugin: @wataruian/cli: Cannot read properties of undefined (reading 'isNil')
at Object.<anonymous> (/Users/wataruian/monorepo/packages/cli/src/configs/project.ts:83:12)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module.m._compile (/Users/wataruian/monorepo/.yarn/__virtual__/ts-node-virtual-6f9ee5be06/0/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at require$$0.Module._extensions..js (/Users/wataruian/monorepo/.pnp.cjs:45357:33)
at Object.require.extensions.<computed> [as .ts] (/Users/wataruian/monorepo/.yarn/__virtual__/ts-node-virtual-6f9ee5be06/0/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Function.require$$0.Module._load (/Users/wataruian/monorepo/.pnp.cjs:45202:31)
at Module.require (node:internal/modules/cjs/loader:1141:19)
I tried recreating the issue on a repo with just single package but using lodash
seems to work there. So it is hard to pinpoint the actual issue.
But the line that is having the issue is just checking if the env var is existing and assigns a value:
const value = !_.isNil(process.env['TEST_VALUE']) ? process.env['TEST_VALUE'] : 'some-test-value';
I am not sure if the issue is with oclif, lodash, ts-node, workspaces or pnp itself (too many factors to consider).
Feel free to close this issue. I'll try to reproduce and debug on my end.
from core.
@wataruian Thanks - feel free to reopen the issue if you trace it down to something in oclif
from core.
@mdonnalley it's weird, doing yarn cache clean && yarn install
and rerunning the command works on my mono repo now. 😄
We can close this officially.
from core.
Related Issues (20)
- topicSeparator space generates wrong message when used alongside usage HOT 1
- Upgrading to a version after 3.20.0 causes issues with hooks HOT 3
- (help): show arg/flag options if user didn't provide any HOT 1
- Command summary displays as topic summary when nested below topic without summary. HOT 1
- Unable to run dev.js outside of the project folder
- BaseCommand Documentation HOT 3
- Errors on command load should throw errors instead of invalidating the command HOT 6
- SimpleAction does not write newline for status change HOT 7
- [BUG]The issue of ux.prompt handling special characters. HOT 3
- Can't run development mode with bun HOT 2
- RangeError on ux.table when column starts with emoji HOT 1
- ux.Table: Incorrect parsing of double quotes when exporting to CSV HOT 3
- ux.table `maxWidth` column option HOT 2
- CliUx.ux.prompt text truncation HOT 3
- Build failure with `exactOptionalPropertyTypes` enabled HOT 5
- [Feature request] Alias a single flag to a set of multiple flags HOT 1
- Getting MaxListenersExceededWarning: Possible EventEmitter memory leak detected. after updating to latest version of oclif HOT 2
- Error bundling @oclif/core into my project HOT 15
- UX tables get displayed along with json output on usage of --json flag HOT 2
- Specify different oclif options for dev and run HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.