Runtime error on import { hbs } from 'ember-cli-htmlbars' in storybook
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, webpack
- Ambito
- frontend
Direzione di ricerca
Riproduci il malfunzionamento nell'esempio Storybook Ember collegato, quindi traccia l'import da lib/utils.js attraverso hash-for-dep/module-entry.js e resolve-package-path/lib/should-preserve-symlinks.ts. Controlla come il process shim di webpack nel browser gestisce process.execArgv. Il lavoro è completo quando l'esempio importa hbs senza un errore a runtime, oppure quando il supporto del package per il browser è documentato chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is ember-cli-htmlbars expected to work in browser context? The storybook example https://github.com/storybookjs/storybook/blob/1f27b252a66e48f4f7106ef7ccc7950a5b715c32/examples/ember-cli/stories/index.stories.js#L1 throws an error at runtime
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at includes (http://localhost:6006/vendors~main.925bee91ab6e54312329.bundle.js:113614:31)
at push../node_modules/resolve-package-path/lib/should-preserve-symlinks.js.module.exports (http://localhost:6006/vendors~main.925bee91ab6e54312329.bundle.js:113622:52)
at Object.<anonymous> (http://localhost:6006/vendors~main.925bee91ab6e54312329.bundle.js:113404:25)
This happens because ember-cli-htmlbars/utils.js requires hash-for-dep
https://github.com/ember-cli/ember-cli-htmlbars/blob/aee846034a6b6772fef7675dad2156e69b40df8e/lib/utils.js#L5
hash-for-dep/module-entry.js requires resolve-package-path
https://github.com/stefanpenner/hash-for-dep/blob/f4cc06e526a36f83427b8ce1a6da2ea616112278/lib/module-entry.js#L3
Which accesses process.execArgv which is not defined on webpack's process shim
https://github.com/stefanpenner/resolve-package-path/blob/3e9b74512521c69609e84736e64d8e21c52a0c55/lib/should-preserve-symlinks.ts#L17
https://github.com/webpack/node-libs-browser/issues/78
Is this issue exclusive to me? Are others facing this as well? Am I missing some config
Downstream Issue: https://github.com/storybookjs/ember-cli-storybook/issues/35
- Lingua principale
- JavaScript
- Stelle
- 77
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ember-cli/ember-cli-htmlbars
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
ember-cli/ember-cli-htmlbars#792 ·
-
TemplateFactory type incompatible with setComponentTemplate type from @types/ember__component Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ember-cli/ember-cli-htmlbars#787 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
ember-cli/ember-cli-htmlbars#781 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ember-cli/ember-cli-htmlbars#779 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ember-cli/ember-cli-htmlbars#774 · 2 commenti ·
Tutte le issue di ember-cli/ember-cli-htmlbars
Issue simili
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100