Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

error: ENOENT: no such file or directory, open './template/src/css/main.css' #1142

Closed
Mohammad-Alavi opened this issue Jan 16, 2022 · 9 comments
Labels
fixed on dev for issues fixed on dev branch

Comments

@Mohammad-Alavi
Copy link

Mohammad-Alavi commented Jan 16, 2022

Describe the bug

I upgraded from 0.27.1 to 0.50.3 and i got this error while using --single.

error: ENOENT: no such file or directory, open './template/src/css/main.css'

Steps to reproduce

Try to generate docs using --single

Information

I am using a Docker Node container.

  • Version of apidoc: 0.50.3
  • Operating system: Windows 10
  • Node version: 14
  • Browser: chrome

Fix that i found

In line 153 of writer.js file
change './template/src/css/main.css' to 'node_modules/apidoc/template/src/css/main.css'

debug info with -d can be found here.

@NicolasCARPi
Copy link
Contributor

How did you install the lib? Is it global or not?

I think a good fix would be to use the findAsset() function like the other assets.

@Mohammad-Alavi
Copy link
Author

Mohammad-Alavi commented Jan 18, 2022

@NicolasCARPi Thanks for the fast replay. 👍
Not Global.
It might be an stupid question but i there any other docs beside this which explains things like --single parameters and findAsset() function? Or i should just dig up the source code to learn about the features of apidoc?

Ill test findAsset() function and come back to you. First i need to find out how it works and where should i use it because i cannot find it anywhere in the mentioned docs.

@NicolasCARPi
Copy link
Contributor

It might be an stupid question but i there any other docs

apidoc --help

Ill test findAsset() function and come back to you. First i need to find out how it works and where should i use it because i cannot find it anywhere in the mentioned docs.

No this was more of a comment to my future self, it is not a user facing function, just something that I need to change in the code. I'm talking about this function: https://github.com/apidoc/apidoc/blob/master/lib/writer.js#L41-L55

@NicolasCARPi
Copy link
Contributor

Can you try the latest code from the dev branch please? (npm i apidoc#dev).

@Mohammad-Alavi
Copy link
Author

Yea, it is fixed. Thank you 😄

@NicolasCARPi
Copy link
Contributor

Ok great, I'll make a new release soon then!

@NicolasCARPi NicolasCARPi added the fixed on dev for issues fixed on dev branch label Jan 18, 2022
@Mohammad-Alavi
Copy link
Author

So when can we expect a release? 😄 Just so i dont forgot to switch to the master 😄

@NicolasCARPi
Copy link
Contributor

Just use the watch feature of github and select "Releases" so you'll get an email for new versions.

@SerGem811
Copy link

SerGem811 commented Mar 29, 2023

I am still facing this error
When this one can be fixed or which version will be fine with this?

Currently i am using latest version 0.54.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed on dev for issues fixed on dev branch
Projects
None yet
Development

No branches or pull requests

3 participants