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

The dll:serve script in the generated package does not work #87

Closed
pomek opened this issue Jan 10, 2022 · 2 comments · Fixed by #88
Closed

The dll:serve script in the generated package does not work #87

pomek opened this issue Jan 10, 2022 · 2 comments · Fixed by #88
Assignees
Labels
squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@pomek
Copy link
Member

pomek commented Jan 10, 2022

📝 Provide detailed reproduction steps (if any)

  1. Generate a new package (you can use the npm version of the tool).
  2. Change cwd as the script suggests.
  3. yarn run dll:serve prints a lot of strings (see: yarn run test prints unexpected characters ckeditor5#11092).

✔️ Expected result

yarn run dll:serve works.

$ http-server ./ -o sample/dll.html
Starting up http-server, serving ./

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.0.13:8080
  http://192.168.0.11:8080
Hit CTRL-C to stop the server
Open: http://127.0.0.1:8080/sample/dll.html

❌ Actual result

image

❓ Possible solution

📃 Other details

  • Once you generate a new package, you can modify its package.json and reinstall dependencies.

  • To avoid executing dll:serve, you can see a version of the colors package in node_modules/ or lock files (package-lock.jsonoryarn.lock`)

  • A proper fix is needed in packages/ckeditor5-package-generator/lib/templates/package.json

  • Node: v14.18.1


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@pomek pomek added squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior. labels Jan 10, 2022
@pomek pomek added this to the iteration 50 milestone Jan 10, 2022
@przemyslaw-zan
Copy link
Member

Due to a bug in colors library, http-server stopped working (which broke wide range of repositories, not just our stuff), but thankfully, fix in http-server is being worked on. In the meantime, temporary fix is to modify packages/ckeditor5-package-generator/lib/templates/package.json as follows:

For yarn, add:

"resolutions": {
  "colors": "1.4.0"
},

For npm, you need to keep in mind that you have to use npm 8.3.0 or later, as it introduced overrides that is equivalent to yarn's resolutions. Also keep in mind, that latest LTS Version of node.js includes npm 8.1.2, which does not have this function yet, and current version is required instead. If you have required version, add:

"overrides": {
  "colors": "1.4.0"
},

@przemyslaw-zan przemyslaw-zan removed this from the iteration 50 milestone Jan 10, 2022
@pomek
Copy link
Member Author

pomek commented Jan 11, 2022

@pomek pomek closed this as completed in #88 Jan 11, 2022
pomek added a commit that referenced this issue Jan 11, 2022
Other (generator): Upgraded the `http-server` package to the latest version to fix a problem with starting the HTTP server for DLL files. Closes #87.
@AnnaTomanek AnnaTomanek added this to the iteration 50 milestone Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants