-
Notifications
You must be signed in to change notification settings - Fork 121
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
Issue running demos on Windows (path/rootDir issue) #1140
Labels
Comments
I do get an error when run:
... on Windows 10 in Powershell. The error I get:
I agree with @hhkaos that we need to get the script at https://github.com/Esri/arcgis-rest-js/blob/main/scripts/get-package-json.js#L19 to be more Windows friendly. |
import * as url from 'url';
import { readFile } from "fs/promises";
import { globby } from "globby";
import pkgDir from "pkg-dir";
import { join } from "path";
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
/**
* Returns an object like:
*
* {
* packageName: package.json contents
* }
*
* For all packages in the packages/* folder.
*/
export default async function getPackages() {
const rootDir = await pkgDir(__dirname);
const packageFiles = await globby(join(rootDir, "packages/*/package.json"));
return Promise.all(
packageFiles.map((pkgPath) => {
return readFile(pkgPath).then((pkg) => {
return JSON.parse(pkg);
});
})
);
} |
BrunoCaimar
added a commit
to BrunoCaimar/arcgis-rest-js
that referenced
this issue
Oct 9, 2024
BrunoCaimar
added a commit
to BrunoCaimar/arcgis-rest-js
that referenced
this issue
Oct 10, 2024
gavinr-maps
pushed a commit
that referenced
this issue
Oct 17, 2024
gavinr-maps
pushed a commit
to gavinr-maps/arcgis-rest-js
that referenced
this issue
Jan 23, 2025
# [4.5.0](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-portal@4.4.1...@esri/arcgis-rest-portal@4.5.0) (2025-01-23) ### Bug Fixes * geocoder demo on windows [Esri#1140](Esri#1140) ([Esri#1177](Esri#1177)) ([bfd7ce9](Esri@bfd7ce9)) * migrate to esm.run ([Esri#1176](Esri#1176)) ([2323340](Esri@2323340)) * small change to trigger a catch-up release ([Esri#1169](Esri#1169)) ([650bca1](Esri@650bca1)) ### Features * add overwrite and isView options ([Esri#1175](Esri#1175)) ([949e341](Esri@949e341)) * Allow arcgis rest places package to use dev endpoints ([Esri#1170](Esri#1170)) ([d0ca26d](Esri@d0ca26d)) * make API keys work with all portal methods ([Esri#1186](Esri#1186)) ([1972413](Esri@1972413))
gavinr-maps
pushed a commit
to gavinr-maps/arcgis-rest-js
that referenced
this issue
Jan 23, 2025
# [4.3.0](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-request@4.2.3...@esri/arcgis-rest-request@4.3.0) (2025-01-23) ### Bug Fixes * geocoder demo on windows [Esri#1140](Esri#1140) ([Esri#1177](Esri#1177)) ([bfd7ce9](Esri@bfd7ce9)) * migrate to esm.run ([Esri#1176](Esri#1176)) ([2323340](Esri@2323340)) * small change to trigger a catch-up release ([Esri#1165](Esri#1165)) ([73aa677](Esri@73aa677)) * small change to trigger a catch-up release ([Esri#1166](Esri#1166)) ([26c33b1](Esri@26c33b1)) * small change to trigger a catch-up release ([Esri#1167](Esri#1167)) ([42fb211](Esri@42fb211)) * small change to trigger a catch-up release ([Esri#1168](Esri#1168)) ([5417fa7](Esri@5417fa7)) * small change to trigger a catch-up release ([Esri#1169](Esri#1169)) ([650bca1](Esri@650bca1)) ### Features * add overwrite and isView options ([Esri#1175](Esri#1175)) ([949e341](Esri@949e341)) * Allow arcgis rest places package to use dev endpoints ([Esri#1170](Esri#1170)) ([d0ca26d](Esri@d0ca26d)) * make API keys work with all portal methods ([Esri#1186](Esri#1186)) ([1972413](Esri@1972413))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
While trying to run
npm start
on Windows in the demo folders, which runsnode ../../scripts/run-demo-server.js
it throws an error in the following line:https://github.com/Esri/arcgis-rest-js/blob/main/scripts/get-package-json.js#L19
The problem is that the build path in
rootDir
has a semicolon (something like/D:/..
), and it is causing an exception in Linux based shells like Gitbash.Reproduction
You will probably need a Windows machine a follow any of the instructions (e.g. job demo instructions)
Logs
Sorry, I don't have them.
System Info
Additional Information
Sorry, I can not provide more context. It was an easy fix, we just removed the semicolon locally, but I don't have time to submit a PR right now, but I wanted to at least issue this.
The text was updated successfully, but these errors were encountered: