snowboard icon indicating copy to clipboard operation
snowboard copied to clipboard

Cannot find module 'svelte/internal'

Open kamihouse opened this issue 4 years ago • 9 comments

When I try to run ./node_modules/snowboard/bin/run html -o dist api.apib like:

testeApib $ node -v
v12.16.2

testeApib $ ./node_modules/snowboard/bin/run lint api.apib
OK

testeApib $ ./node_modules/snowboard/bin/run list api.apib
✔  Input(s) parsed in 40 ms.
 GET     /                 200
 GET     /gists            200
 POST    /gists            201
 GET     /gists/{id}       200
 PATCH   /gists/{id}       200
 DELETE  /gists/{id}       204
 PUT     /gists/{id}/star  204
 DELETE  /gists/{id}/star  204
 GET     /gists/{id}/star  200

testeApib $ ./node_modules/snowboard/bin/run html -o dist api.apib
✔  Input parsed: api.apib in 43 ms.

On browser I get the following error: class App extends !(function webpackMissingModule() { var e = new Error("Cannot find module 'svelte/internal'"); e.code = 'MODULE_NOT_FOUND'; throw e; }

kamihouse avatar Apr 10 '20 16:04 kamihouse

@kamihouse thanks for the report; the root cause of the issue is because of the webpack module resolution issue. I've pushed fixes in v4.1.5. Please retry and let me know.

subosito avatar Apr 23 '20 03:04 subosito

Sorry but I have exactly the same issues on 4.1.19 and 4.1.20 versions as well.

TBadyl avatar Dec 03 '20 23:12 TBadyl

Hey I have the same issue with version 4.1.21

But I am getting this when using the docker image on Windows 10

X-Ray-Jin avatar Jan 18 '21 19:01 X-Ray-Jin

Yep, we can confirm the issue is still present in version 4.1.21 in a Ubuntu build running on Travis.

aitor avatar Jan 19 '21 09:01 aitor

@aitor @X-Ray-Jin @n4rq5 have you got it somehow solved or using some kind of workaround? Currently trying to migrate from aglio to snowboard and have the same issue on Mac (Big Sur) & Node v12.20.2. Blank index.html page with the same error "Cannot find module 'svelte/internal'"

janis-vitols avatar Feb 26 '21 12:02 janis-vitols

@janis-vitols After trial and error attempts we discovered the issue was Node v12. Had to downgrade to v10 to make it work.

TBadyl avatar Mar 01 '21 18:03 TBadyl

@n4rq5 thanks. Downgraded to v10.23.3, generated HTML files, but unfortunately got the same error :/

janis-vitols avatar Mar 01 '21 18:03 janis-vitols

Couldn't figure out how to get this working, as a result, switched to redoc.

janis-vitols avatar Mar 04 '21 20:03 janis-vitols

Thanks for your replies. In the end we've found an alternative and are now using the Apiary CLI https://help.apiary.io/tools/apiary-cli/

X-Ray-Jin avatar Mar 31 '21 17:03 X-Ray-Jin