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
npx ember-cli@latest new new_fancy_app -b @embroider/app-blueprint --pnpm --skip-git --skip-npm
and did some testing to make sure live-reload works. Then I wanted to create a new route with ember generate route otherroute but it failed with
unknown file: Cannot read properties of undefined (reading 'replace')
The stack trace:
TypeError: unknown file: Cannot read properties of undefined (reading 'replace')
at cleanUrl (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@embroider/shared-internals/src/paths.js:54:16)
at PluginPass.enter (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@embroider/shared-internals/src/template-colocation-plugin.js:28:57)
at newFn (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/visitors.js:172:14)
at NodePath._call (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:49:20)
at NodePath.call (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:39:18)
at NodePath.visit (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:85:31)
at TraversalContext.visitQueue (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitSingle (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/context.js:112:19)
at traverseNode (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at traverse (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/index.js:53:34)
at transformFile (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/index.js:82:31)
at transformFile.next (<anonymous>)
at run (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/index.js:24:12)
at run.next (<anonymous>)
at transform (/home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transform.js:22:33)
at transform.next (<anonymous>)
at step (/home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:261:32)
at /home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:223:11)
at /home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:189:28
at /home/embertesting/new_fancy_app/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/gensync-utils/async.js:67:7
at /home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:113:33
at step (/home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:287:14)
at /home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/embertesting/new_fancy_app/node_modules/.pnpm/[email protected]/node_modules/gensync/index.js:223:11)
=================================================================================
For now I fixed it by adding an if statement to the cleanUrl function which checks if the variable is not undefined, else I return an empty string
Created a brand new app with
and did some testing to make sure live-reload works. Then I wanted to create a new route with
ember generate route otherroute
but it failed withThe stack trace:
For now I fixed it by adding an if statement to the
cleanUrl
function which checks if the variable is not undefined, else I return an empty stringembroider/packages/shared-internals/src/paths.ts
Line 50 in c2dff54
But that's probably not the right solution (more like a bandage), but I lack the knowledge to dig deeper into this.
The text was updated successfully, but these errors were encountered: