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

[0.33.2 regression] Cannot read property 'name' of undefined #869

Closed
C0ZEN opened this issue Feb 12, 2022 · 2 comments · Fixed by #871
Closed

[0.33.2 regression] Cannot read property 'name' of undefined #869

C0ZEN opened this issue Feb 12, 2022 · 2 comments · Fixed by #871
Labels
bug Something isn't working

Comments

@C0ZEN
Copy link

C0ZEN commented Feb 12, 2022

When building my app with the latest version 0.33.2, I have this error during the build: Cannot read property 'name' of undefined.
Everything was OK with the 0.33.1.
The script used is ncc build --license licenses.txt --minify.

StackTrace:

ncc: Version 0.33.2
ncc: Compiling file index.js into CJS
ncc: Using typescript@4.5.5 (local user-provided)
HookWebpackError: Cannot read property 'name' of undefined
    at makeWebpackError (S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:37:374401)
    at S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:37:177732
    at eval (eval at create (S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:20:107860), <anonymous>:13:1)
    at fn (S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:37:140906)
    at _next0 (eval at create (S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:20:107860), <anonymous>:11:1)
    at eval (eval at create (S:\C0ZEN\Documents\sonia\stale\node_modules\@vercel\ncc\dist\ncc/index.js.cache.js:20:107860), <anonymous>:26:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

This is visible on this public repository: Sonia-corporation/stale#466

@crs-k
Copy link

crs-k commented Feb 12, 2022

I am having the same issue with moving from from 0.33.1 to 0.33.2

Public repo: crs-k/stale-branches#257

Adding some detail since my script is slightly different:
ncc build --source-map --license licenses.txt

typescript-action@0.0.0 package
set NODE_OPTIONS=--openssl-legacy-provider && ncc build --source-map --license licenses.txt

ncc: Version 0.33.2
ncc: Compiling file index.js into CJS
HookWebpackError: Cannot read properties of undefined (reading 'name')
    at makeWebpackError (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:374401)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:177732
    at eval (eval at create (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:20:107860), <anonymous>:13:1)
    at fn (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:140906)
    at _next1 (eval at create (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:20:107860), <anonymous>:11:1)
    at eval (eval at create (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:20:107860), <anonymous>:27:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
-- inner error --
TypeError: Cannot read properties of undefined (reading 'name')
    at PluginChunkReadHandler.extractIdentifiedModule (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602615)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602222
    at WebpackInnerModuleIterator.internalCallback (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:622425)
    at WebpackInnerModuleIterator.iterateModules (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:622056)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602184
    at WebpackChunkModuleIterator.iterateModules (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:614534)
    at PluginChunkReadHandler.processChunk (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602128)
    at _loop_1 (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:618468)
    at WebpackCompilerHandler.iterateChunks (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:619131)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:616874
caused by plugins in Compilation.hooks.processAssets
TypeError: Cannot read properties of undefined (reading 'name')
    at PluginChunkReadHandler.extractIdentifiedModule (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602615)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602222
    at WebpackInnerModuleIterator.internalCallback (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:622425)
    at WebpackInnerModuleIterator.iterateModules (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:622056)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602184
    at WebpackChunkModuleIterator.iterateModules (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:614534)
    at PluginChunkReadHandler.processChunk (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:602128)
    at _loop_1 (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:618468)
    at WebpackCompilerHandler.iterateChunks (/home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:619131)
    at /home/runner/work/stale-branches/stale-branches/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:616874

@C0ZEN C0ZEN changed the title Cannot read property 'name' of undefined [0.33.2 regression] Cannot read property 'name' of undefined Feb 12, 2022
@C0ZEN
Copy link
Author

C0ZEN commented Feb 12, 2022

Workaround: removing the flag --license makes the build pass.

@styfle styfle added the bug Something isn't working label Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants