Comments (2)
I do get an error when run:
cd demos/geocoder-browser
npm i
npm start
... on Windows 10 in Powershell.
The error I get:
> @esri/[email protected] start
> node ../../scripts/run-demo-server.js
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
at new NodeError (node:internal/errors:405:5)
at validateString (node:internal/validators:162:11)
at join (node:path:429:7)
at getPackages (file:///C:/_work/arcgis-rest-js/scripts/get-package-json.js:19:37)
at async file:///C:/_work/arcgis-rest-js/scripts/run-demo-server.js:7:20 {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v18.17.1
npm ERR! Lifecycle script `start` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @esri/[email protected]
npm ERR! at location: C:\_work\arcgis-rest-js\demos\geocoder-browser
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.
from arcgis-rest-js.
__dirname
is not being constructed properly. The root should be the project directory not the full path of the project directory on disk.
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);
});
})
);
}
from arcgis-rest-js.
Related Issues (20)
- Flakey tests
- Expose error.details as a property on ArcGISRequestError and subclasses
- Version numbers in header of dist files do not match actual version HOT 1
- owningSystemUrl in IServerInfo is not available in JS SDK's ServerInfo HOT 3
- Creating a new feature with a point failing HOT 2
- Update REST JS places documentation to reflect pagination changes HOT 1
- Too many dependabot alerts
- Hub needs ability to search for users outside the currently authenticated user's organization HOT 2
- Provide option to force `/addItem` request to use `form-data` content type HOT 3
- Module Resolution not working with @tsconfig/node18/tsconfig.json HOT 4
- updateUserMemberships - Wrong documentation for parameters HOT 6
- REST JS Request 3.7.0 /bundled/ CDN not resolving HOT 2
- NPM Current version for @esri/arcgis-rest-request HOT 2
- v3 branch and release process improvements
- 🎃 𝗛𝗮𝗰𝗸𝘁𝗼𝗯𝗲𝗿𝗳𝗲𝘀𝘁 𝗗𝗲𝘁𝗮𝗶𝗹𝘀 𝗳𝗼𝗿 𝗣𝗮𝗿𝘁𝗶𝗰𝗶𝗽𝗮𝗻𝘁𝘀 👨💻 HOT 1
- Unit tests: `Deprecated: Passing fetch-mock reset methods directly in as handlers for before/after test runner hooks`
- Update automated unit tests to run on Node 20 HOT 4
- Add support for new 'icon' param of places service
- Geocoding - README links to old documentation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-rest-js.