Open c4kaci opened 3 years ago
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.
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
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
First Windows tests!
This is the line that is resolving the path. https://github.com/thejustinwalsh/uxp-starter-react/blob/e161e3063559d7974db7ec0e82e15b37bd0a0b24/scripts/install.mjs#L14
Looks like this is expected. The leading '/' needs to be stripped. https://github.com/nodejs/node/issues/23026
Should be a quick change, and if it works an easy PR!
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:///', '');`
Hi,
After compilation (npm run watch) manifest.json missing from the dist folder. Workaround: copy manifest.json.ejs to manifest.json
Thx Karoly