Git Product home page Git Product logo

Comments (4)

c4kaci avatar c4kaci commented on May 30, 2024 1

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:///', '');`

from uxp-starter-react.

thejustinwalsh avatar thejustinwalsh commented on May 30, 2024

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

from uxp-starter-react.

c4kaci avatar c4kaci commented on May 30, 2024

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

from uxp-starter-react.

thejustinwalsh avatar thejustinwalsh commented on May 30, 2024

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!

from uxp-starter-react.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.