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

dist/manifest.json missing #1

Open
c4kaci opened this issue Jul 19, 2021 · 4 comments
Open

dist/manifest.json missing #1

c4kaci opened this issue Jul 19, 2021 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@c4kaci
Copy link

c4kaci commented Jul 19, 2021

Hi,

After compilation (npm run watch) manifest.json missing from the dist folder.
Workaround: copy manifest.json.ejs to manifest.json

Thx
Karoly

@thejustinwalsh
Copy link
Owner

thejustinwalsh commented Jul 20, 2021

npm install should have run an install script to generate the manifest.json for you.
If not you can run npm run manifest to generate a new manifest.json.

"install": "node scripts/install.mjs",
"manifest": "shx rm -f plugin/manifest.json && npm run install",

Would you mind trying again and letting me know what the output was from npm install? I am not sure why that install script would be skipped?

Thinking maybe the wording here could be updated to be more clear about the requirements of a manifest.json file and how to generate it.
https://github.com/thejustinwalsh/uxp-starter-react/blob/main/README.md#setup

@c4kaci
Copy link
Author

c4kaci commented Jul 20, 2021

I cloned and tried again to run: npm install

PS E:\Develop\Photoshop\UXP\uxp-starter-react> npm install

@0.1.4 install E:\Develop\Photoshop\UXP\uxp-starter-react
node scripts/install.mjs

[UXP-STARTER-REACT] First time manifest generation...
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^

[Error: ENOENT: no such file or directory, open 'E:\E:\Develop\Photoshop\UXP\uxp-starter-react\plugin\manifest.json.ejs'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'E:\E:\Develop\Photoshop\UXP\uxp-starter-react\plugin\manifest.json.ejs'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @0.1.4 install: node scripts/install.mjs
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @0.1.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kaci\AppData\Roaming\npm-cache_logs\2021-07-20T17_33_36_491Z-debug.log
PS E:\Develop\Photoshop\UXP\uxp-starter-react>

I don't know what generates the wrong path: 'E:\E:\Develop\Photoshop\UXP\uxp-starter-react\plugin\manifest.json.ejs' but E:\E:\ is definitely wrong

@thejustinwalsh
Copy link
Owner

thejustinwalsh commented Jul 21, 2021

First Windows tests!

This is the line that is resolving the path.

const root = path.dirname(new URL(import.meta.url).pathname);

Looks like this is expected. The leading '/' needs to be stripped.
nodejs/node#23026

Should be a quick change, and if it works an easy PR!

@thejustinwalsh thejustinwalsh added bug Something isn't working good first issue Good for newcomers labels Jul 21, 2021
@c4kaci
Copy link
Author

c4kaci commented Jul 21, 2021

It works now.
I changed L:14

`// const root = path.dirname(new URL(import.meta.url).pathname);

const root = path.parse(import.meta.url).dir.replace('file:///', '');`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants