You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Build failed with 1 error:
../../../common/temp/node_modules/.pnpm/@oclif+core@1.0.2/node_modules/@oclif/core/lib/errors/errors/cli.js:40:38: error: Could not resolve "../screen"
...20 lines omitted...
suggestion: ''
},
notes: [],
pluginName: '',
text: 'Could not resolve "../screen"'
}
],
warnings: []
}
ERROR: "build:esbuild" exited with 1.
Cause
Is there a reason you guys are mixing inline requires with import syntax? I've found this can cause a lot of issues in the past and can't see any obvious benefit?
The last link is specifically the line that throws the error described, but I imagine there will be a lot of others once this is resolved if this one has managed to get through your CI / tests given that the ../screen file doesn't exist.
See here for ../ directory (note the screen file exists in the next level up):
These inline requires are not handled well by the tsc compiler whereas using top of page imports will have definitely failed to build, alerting you to the error much sooner before publishing.
Context
@oclif/core 1.0.2
esbuild 0.13.9
typescript 4.4.3
The text was updated successfully, but these errors were encountered:
Description
Encountered issue when bundling with esbuild:
Cause
Is there a reason you guys are mixing inline
requires
withimport
syntax? I've found this can cause a lot of issues in the past and can't see any obvious benefit?Examples
https://github.com/oclif/core/blob/main/src/errors/errors/cli.ts#L36
https://github.com/oclif/core/blob/main/src/errors/errors/cli.ts#L49-L50
https://github.com/oclif/core/blob/main/src/errors/errors/cli.ts#L54
The last link is specifically the line that throws the error described, but I imagine there will be a lot of others once this is resolved if this one has managed to get through your CI / tests given that the
../screen
file doesn't exist.See here for
../
directory (note thescreen
file exists in the next level up):This would be avoided by enforcing typescript-eslint/no-require-imports with a hard
error
during build.These inline requires are not handled well by the
tsc
compiler whereas using top of pageimports
will have definitely failed to build, alerting you to the error much sooner before publishing.Context
The text was updated successfully, but these errors were encountered: