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

Runtime error on import { hbs } from 'ember-cli-htmlbars' #35

Closed
iamareebjamal opened this issue Apr 16, 2020 · 2 comments
Closed

Runtime error on import { hbs } from 'ember-cli-htmlbars' #35

iamareebjamal opened this issue Apr 16, 2020 · 2 comments
Labels
question Further information is requested

Comments

@iamareebjamal
Copy link

iamareebjamal commented Apr 16, 2020

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

webpack/node-libs-browser#78

Is this issue exclusive to me? Are others facing this as well? Am I missing some config

@iamareebjamal
Copy link
Author

Even after manually editing should-preserve-symlinks.js, it proceeds but I get another error

Object(...) is not a function
TypeError: Object(...) is not a function

I am surely missing something because everything works in the example repo https://github.com/storybookjs/storybook/tree/v5.3.18/examples/ember-cli/
This is the PR for reference - fossasia/open-event-frontend#4325

@iamareebjamal
Copy link
Author

Working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants