Giter Club home page Giter Club logo

arcgis-js-cli's People

Contributors

andygup avatar biboba avatar cov-gis avatar davewilton avatar dependabot[bot] avatar gavinr avatar gavinr-maps avatar jcartwright-noaa avatar jcfranco avatar odoe avatar ralucanicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcgis-js-cli's Issues

Cannot init vue or calcite app

Description

When initializing an app in an existing directory, the only types available are "jsapi" and "react"

Expected Behavior

Types "vue" and "calcite" should be type options for the init command.

Actual Behavior

path\to\my-project>arcgis init calcite
arcgis init [type]

Initialize a new application in current directory

Options:
--version Show version number [boolean]
--type, -t A project template [choices: "jsapi", "react"] [default: "jsapi"]
-h, --help Show help [boolean]

Invalid values:
Argument: type, Given: "calcite", Choices: "jsapi", "react"

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:4.14.2
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

Add vue template

Description

Provide a vue template for the cli

Expected Behavior

arcgis create jsapi-vue-app -t vue should scaffold a vue application.

Context

This will provide another framework alternative for users of the arcgis cli.

UI components

Request your advise:
Which UI components (or UI library) you suggest to use along with this cli.
I would like to add UI components to widgets like DateTime picker, Calendar, Color picker, Treeview, Tabs, Accordions, etc...

Thank you.

Description

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used: 4.12.1 (jsapi)
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

npm run build react -t (eslint)

running

arcgis create -t react
npm install
npm run build

Expected Behavior

Should just build

Throws

Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.js': Cannot find module 'eslint/lib/util/traverser'
Require stack:

  • C:\working-2020\azure_repos\meiz\webapp\node_modules@typescript-eslint\parser\dist\parser.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\lib\cli-engine\config-array-factory.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\lib\cli-engine\cascading-config-array-factory.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\lib\cli-engine\cli-engine.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\lib\cli-engine\index.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\lib\cli.js
  • C:\working-2020\azure_repos\meiz\webapp\node_modules\eslint\bin\eslint.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (C:\working-2020\azure_repos\meiz\webapp\node_modules@typescript-eslint\parser\dist\parser.js:6:37)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! [email protected] lint: eslint --fix "src/**/*.ts?(x)"
    npm ERR! Exit status 2
    npm ERR!
    npm ERR! Failed at the [email protected] lint 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\pau10549\AppData\Roaming\npm-cache_logs\2020-02-13T19_24_25_850Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: npm run lint && webpack --mode production
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build 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\pau10549\AppData\Roaming\npm-cache_logs\2020-02-13T19_24_25_896Z-debug.log

Possible Fix

downgrade eslint: to 5.14
webpack-contrib/eslint-loader#287

Steps to Reproduce

  1. arcgis create -t react
    2.npm install
    3.npm run build

npm start error

npm start error

Description

D:\ArcGIS_JS\jsapi-vue-app (master -> origin) ([email protected])
λ npm start

[email protected] start D:\ArcGIS_JS\jsapi-vue-app
webpack-dev-server --history-api-fallback --mode development --open

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module './dist/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\ArcGIS_JS\jsapi-vue-app\node_modules\webpack-pwa-manifest\index.js:1:80)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\ArcGIS_JS\jsapi-vue-app\webpack.config.js:10:28)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: webpack-dev-server --history-api-fallback --mode development --open
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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\administere\AppData\Roaming\npm-cache_logs\2019-10-15T03_46_34_804Z-debug.log

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version: 版本 75.0.3770.90(正式版本) (64 位)
  • Operating System and version (desktop or mobile): win10
  • Link to your project if available:

Build error : ENOENT: no such file or directory, open '/Users/x/Workspace/app/node_modules/dojo/dojo.js'

Description

I faced an issue on a project that started from this CLI : I recreated the package-lock.json file and then I could not build my application any more. Build throws:
Error: ENOENT: no such file or directory, open '/Users/x/Workspace/app/node_modules/dojo/dojo.js'

Indeed, no dojo folder is installed in node_modules. Taking a look at the package-lock.json file which have been updated, all the dojo dependencies from arcgis-js-api have moved from requires to dependencies:

image

I can reproduce this issue on the application generated by the CLI.

Expected Behavior

rm -rf node_modules && rm package-lock.json && npm install && npm run build && rm -rf node_modules && npm install && npm run build should work

Actual Behavior

Throws error:
Error: ENOENT: no such file or directory, open '/Users/x/Workspace/app/node_modules/dojo/dojo.js'

Possible Fix

I noticed that in the application generated by arcgis init, package-lock.json file is not commited as it is in .gitignore. Isn't that file supposed to be commited ?
It actually solved my issue because I was building the application on gitlab runner and it would not build because of my package-lock.json that I had recreated. Removing it fixed it but is there another solution because npm mention that this file should be commited ?

Steps to Reproduce

  1. arcgis init
  2. rm -rf node_modules
  3. npm install
  4. npm run build

Context

I would like to be able to build the application with package-lock.json in source control.

Your Environment

  • Version used: npm 6.4.1, node v8.9.1, @arcgis/cli: 4.9.2
  • Browser Name and version:
  • Operating System and version (desktop or mobile): MacOS Mojave
  • Link to your project if available:

SceneView not work in 4.12

Description

SceneView not work in 4.12, the same code worked in 4.11

Expected Behavior

Show map in 3D scene

Actual Behavior

TypeError: ve is not a constructor in SceneView.js:25:3266

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

app creation partially fails; node-sass version under macOS

Description

App creation only partially succeeds due to lack of node-sass; webpack failures result from lack of node-sass in the project.

This appears if there is no binding available for the version of node-sass in package.json and compilation of node-sass fails, which I'm experiencing and seems related to this GeoNet post, where node-sass version referenced also did not have a binding available.

Expected Behavior

Scaffold a new app with all dependencies installed.

Actual Behavior

New app created without all dependencies; mixed reporting of success (something went wrong, but was installed).

Possible Fix

Bump node-sass to ~4.12.0 in templates/basic/app/package.json. Consider sticking with versions of node-sass that have bindings available in future releases.

Steps to Reproduce

  1. npm install -g @arcgis/cli
  2. arcgis create example
  3. cd example
  4. npm start

Step 2 above includes these three lines at end of output:

Running npm install
✖ Oops, something went wrong...
Done! Your ArcGIS JSAPI application has been installed!

Step 4 errors out and includes a couple of Error: Cannot find module 'node-sass' messages.

Running npm install in the new app directory has output that includes:

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/darwin-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.11.0/darwin-x64-72_binding.node":

HTTP error 404 Not Found

Context

Create an app.

Your Environment

  • macOS 10.14.4
  • node v12.4.0
  • @arcgis/cli: 4.11.1

Uncaught (in promise) from search widget

I added a simple widget search and when I hit something I get the error Uncaught (in promise).

// Widgets
import LayerList from 'esri/widgets/LayerList';
import Legend from 'esri/widgets/Legend';
import Search from 'esri/widgets/Search';
import esri = __esri;

export function initWidgets(view: esri.MapView | esri.SceneView) {
    const legend = new Legend({ view });
    const layerList = new LayerList({ view });
    const search = new Search({ view: view });
    view.ui.add(legend, 'bottom-left');
    view.ui.add(layerList, 'top-right');
    view.ui.add(search, 'top-right');
    return view;
}

Capture

Capture

New widget styles are not getting effected

Description

Style file (scss) that's got created under "styles" folder for a widget is not getting applied. Do we need to load the style file manually somewhere?

Expected Behavior

Style file should be applied on to the widget in runtime

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used: 4.9.3
  • Browser Name and version: Mozilla Firefox 63.0.3 (64-bit)
  • Operating System and version (desktop or mobile): Laptop, Microsoft Windows 10 Pro
  • Link to your project if available:

BUG: Widget implementation within ArcGIS cli jsapi project fails

the command
arcgis widget MyWidget

Description

There are several guides for typescript to get started, and generally these examples have aged, and require some fixing to work today. It is not clear how to include an ArcGIS CLI widget in the ArcGIS CLI created project or how to import the same widget into the ArcGIS created project. Additionally, there is a bug with the widget creation.

Expected Behavior

expected the arcgis widget template is created within the application
arcgis-js-cli/templates/basic/widget/src/widgets/WidgetName.tsx should properly replace the Widget's Name parameter in the template.. looks like its for both the <%name>Property interface and then later in the reference to this interface.

Actual Behavior

throws this error:
Error: The widget command can only be used in a jsapi type app scaffolded with 'arcgis-js-cli' or exb widgets

Possible Fix

simple update in the documentation to show how to help with widget development, or change to the CLI.

Steps to Reproduce

run:
arcgis create myapp
cd myapp
arcgis widget mywidget

Context

I'm just learning how to work with typescript to extend the arcgis javascript api widgets, so this may not be a real issue. thanks.

Your Environment

npm version 6.13.4
vscode version 1.42.1
ArcGIS CLI broken version:4.14.2
ArcGIS CLI known good version: 4.13.0

Add React component to “jsapi”

Description

I understand that “-type react” for this cli is in making.
However, can we add a react component to application of type “jsapi” and make it work?

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

Help says `index.js` instead of `arcgis`

Description

Minor issue - when I view the help, it says index.js everywhere it should say the command name (arcgis).

Expected Behavior

Help text should look like what's in the README (and not have index.js)

Actual Behavior

Help text says index.js everywhere it should say arcgis:
image

Steps to Reproduce

  1. npm install -g @arcgis/cli
  2. arcgis --help

Your Environment

  • Version used: @arcgis/[email protected]
  • Browser Name and version: n/a
  • Operating System and version (desktop or mobile): Windows 10
  • Link to your project if available: n/a

watchUtils undefined after import

Description

Hello there

I used this cli to create a react application template. I imported watchUtils in data/map.ts but cannot use it's methods as watchUtils is undefined after the import. Any help would be highly appreciated.

Expected Behavior

watchUtils's methods should be accessible after loading it with

import watchUtils from 'esri/core/watchUtils';

Actual Behavior

Getting Error message in chrome when trying to access watchUtil's methods.

Uncaught (in promise) TypeError: Cannot read property 'init' of undefined
    at map.ts:21

Steps to Reproduce

  1. Create react application (arcgis create jsapi-react-app -t react)
  2. Run npm start command
  3. Add the following code to data/map.ts:
import watchUtils from 'esri/core/watchUtils';

[...]

view.when(function(){
  watchUtils.init(view, "extent", function() {
    console.log("Extent changed");
  });
})
  1. Start the application in the browser.

Environment

  • Version used:
  • Google Chrome 78.0.3904.97
  • Ubuntu 18.04

Template app does not work on Windows

It looks like the css portion of the loaders do not work on Windows.

Description

Multiple failures while trying to parse the .scss of the template app.

Expected Behavior

It shouldn't fail.

Actual Behavior

[./src/css/main.scss] 1.43 KiB {index} [built] [failed] [1 error]
[./src/index.ts] 323 bytes {index} [built]
    + 2032 hidden modules

ERROR in ./src/css/main.scss
Module build failed: ModuleParseError: Module parse failed: Unexpected character ' ' (1:0)

Possible Fix

Nothing yet.

Steps to Reproduce

  1. arcgis create myapp
  2. cd myapp
  3. npm start

Context

Your Environment

  • Version used: 4.7.2
  • Browser Name and version: na
  • Operating System and version (desktop or mobile): Windows 10
  • Link to your project if available: na

Vue template: migrate from intern

Description

The Vue template app currently uses intern for tests. Investigate maybe moving to jest or another testing library. Looks like jest could be used with vue, but there could be some build conflicts to get it to work, so will need to research further.

Search Widget display in jsapi-react-app

Hi,
I ran into an issue when integrating the search widget (ESRI api 4) to a React App created with this cli. I would highly appreciate help or hints in this matter:

Description

The search widget does not look or work the way I expect: No location suggestions are offered when typing and the interface looks very much different compared to how it normally looks when only using the api 4. Other widgets (such as legend, sketch) work as expected.

Expected Behavior

The widget should work and look similar to this.

Actual Behavior

The widget is displayed like this and offers no location suggestions as the user is typing
image
image

Steps to Reproduce

  1. create a react application arcgis create jsapi-react-app -t react
  2. In map.ts, add
import Search from 'esri/widgets/Search';
...
export const search = new Search({
    view: view
})
view.ui.add(search, 'top-right')

  1. Run the application with the start script

Your Environment

  • Version used: 4.14.2
  • Browser Name and version: Chrome Version 80.0.3987.122
  • Ubuntu 18.04.4 LTS

npm install changes gitignore to npmignore when scaffolding apps

Description

When a user npm i -g @arcgis/cli, the .gitignore in the package is converted to .npmignore on the machine. I don't know why.

npm pack shows all the .gitignore files are in the tarball.
npm publish shows that the published tarball contains the .gitignore files.

This is insanity.

Expected Behavior

Should not rename .gitignore files should stay .gitignore files.

Actual Behavior

.gitignore installed as .npmignore

Possible Fix

I'll probably have to manually create the .gitignore file when an application is scaffolded. Not too difficult, but why

Steps to Reproduce

  1. npm i -g @arcgis/cli
  2. arcgis create my-app
  3. .npmignore is contents of .gitignore
  4. cry

Context

Your Environment

  • Version used: 12.2.x
  • Operating System and version (desktop or mobile): MacOS, I think I've seen this on Windows 10 too.
  • Link to your project if available: You're looking at it

print default widget lost format

Description

used the arcgis cli to create app

Expected Behavior

the print widget should display with proper formatting
image

Actual Behavior

it does not diplay with the proper css formatting
image

Possible Fix

Steps to Reproduce

  1. added a the default print widget from agol
  2. to the AppViewModel.ts file
  3. const print = new Print({
    view: this.view,
    printServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
    })
  4. this.view.ui.add(printExpand, "top-right");

Context

jut trying to add the print widget from agol

Your Environment

  • Version used: 4.11
  • Browser Name and version: 73.0.3683.103 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Windows 10
  • Link to your project if available:

Missing source maps

Description

Source maps are missing in chrome:
image

I also worry that users new to webpack won't know where to look for the source. Is it worth adding this to the readme?

Expected Behavior

Source maps are used for TS code

Actual Behavior

No source maps

Possible Fix

Webpack config needs updating

Steps to Reproduce

Create new project and attempt to debug

Context

Your Environment

Chrome latest on windows 10

Error when using await on promise

Description

When trying to use await on esri js promise (eg: await map.load()), I have a typescript warning:
"TS1308: 'await' expression is only allowed within an async function."

and compilation fails:
"Module parse failed: The keyword 'yield' is reserved (38:16)
You may need an appropriate loader to handle this file type."

Any idea ? Thanks !

Expected Behavior

I expected await to work on esri js api Promise.

Actual Behavior

Typescript compilation failed.

Your Environment

  • Version used: 4.10
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

Module not found for client-side FeatureLayer

Creating a FeatureLayer with client-side graphics causes a runtime error because of a missing worker module.

Description

When creating an app with the CLI and adding a simple FeatureLayer with client-side graphics (like here), the layer cannot be created and errors are logged to the console.

Expected Behavior

The layer is added without errors.

Actual Behavior

Error: Module not found: esri/layers/graphics/sources/support/MemorySourceWorker at findModule (index.c27875b3b81d7914f7ad.js:278) at contextRequire (index.c27875b3b81d7914f7ad.js:299) at result (index.c27875b3b81d7914f7ad.js:221) at eval (workers.js:25)

Possible Fix

It looks like a webworker (MemorySourceWorker) module cannot be resolved.

Steps to Reproduce

  1. clone https://github.com/ReneU/client-side-featurelayer
  2. npm install
  3. npm start

Context

I was trying to use the sample provided here in my app. The only changes to the app template are in https://github.com/ReneU/client-side-featurelayer/blob/master/src/widgets/App.tsx

Your Environment

Cannot test/run async code

Description

I cannot manage to test code that runs asynchronously.
I read intern documentation about it and I still cannot make it works.

I have some 404 errors from webpack when running the tests.
I suspect the issue is that as intern webserver is running by default at:
http://localhost:9000/node_modules/intern/
It tries to call the tests bundle from there:
GET http://localhost:9000/node_modules/intern/12.js net::ERR_ABORTED 404 (Not Found)
while it should be and is available at:
http://localhost:9000/~tmp/12.js

As it never resolve the tested promise, Intern returns time-out:
TimeoutError: Timeout reached on intern

Expected Behavior

It should be possible to test asynchronous job.

Actual Behavior

404 errors in console, and promise never resolved so tests never successful.

Possible Fix

Steps to Reproduce

  1. Init an app with arcgis create
  2. Add the following test to tests/unit/widgets/App.ts:

Add esriRequest module at the top of the file:

import esriRequest from "esri/request";

test("can run async", () => {
    var url = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.geojson";
    return esriRequest(url, {
      responseType: "json"
    }).then(function(response){
      // The requested data
      assert(true);
    });
  });
  1. Run the tests : npm run test

Context

I was trying to test a function returning a Promise.

Your Environment

  • Version used: 4.10
  • Browser Name and version: Chrome 72.0.3626.121
  • Operating System and version (desktop or mobile): Windows

Thanks for your help !

New Feature Request: Make it easier to switch between api versions

Description

Having hit a bug in the 4.9 API i'm having to downgrade. I have found it difficult to switch between versions once committed to coding in the cli.
It would be good if there was an easy way to switch between versions of the JS api without needing to download different versions of the CLI.

Possible Idea

running "arcgis create --version 4.8" should create a 4.8 application without error

adding arcgis update --version 4.8 should convert the app to the target api.

App Name does not refresh on re-build

Description

When running app through npm start, the app's name is not updated in page. It works as expected (app name changed) when running npm run serve though.

Expected Behavior

Modifying the app name in index.ts should change the text in the header on the app

Actual Behavior

Modifying the appName variable in index.ts does not change the text in the header on the app (still says ARCGIS TEMPLATE APP)

Steps to Reproduce

  1. npm install -g @arcgis/cli
  2. mkdir temp
  3. cd temp
  4. arcgis create demo .
  5. npm start
  6. Open src/index.ts in a text editor, and modify the string Template App to anything else (Ex: test)
  7. Notice that the webmack build happens, and the page is refreshed, but the title in the page still says ARCGIS TEMPLATE APP
    image

Your Environment

  • Version used: @arcgis/[email protected]
  • Browser Name and version: Chrome latest
  • Operating System and version (desktop or mobile): Windows 10 Enterprise, v1607

Template app needs a Promise shim for IE11

Description

Template app does not work in IE11 because it does not have native Promise

Expected Behavior

Needs a shim

Actual Behavior

💩

Possible Fix

Add import "@dojo/shim/Promise"; to app

Steps to Reproduce

💩

Context

Your Environment

  • Version used: 4.7.2
  • Browser Name and version: IE11
  • Operating System and version (desktop or mobile): Win10/Win8
  • Link to your project if available:

Html Webpack Plugin error

After successful creation npm run start ends up with the Html Webpack Plugin error.

Steps to Reproduce

  1. Install cli
  2. Create any app
  3. npm run start
  4. ERROR in Error: Child compilation failed:
    /home/piotrek/dev/esri/hello/node_modules/lodash/lodash. js
    Cannot read property 'replace' of undefined:
    TypeError: /home/piotrek/dev/esri/hello/node_modules/lod ash/lodash.js
    Cannot read property 'replace' of undefined
  • compiler.js:79 childCompiler.runAsChild
    [hello]/[html-webpack-plugin]/lib/compiler.js:79:16
  • Compiler.js:296 compile
    [hello]/[webpack]/lib/Compiler.js:296:11
  • Compiler.js:553 hooks.afterCompile.callAsync.err
    [hello]/[webpack]/lib/Compiler.js:553:14
  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [hello]/[tapable]/lib/Hook.js:154:20
  • Compiler.js:550 compilation.seal.err
    [hello]/[webpack]/lib/Compiler.js:550:30
  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [hello]/[tapable]/lib/Hook.js:154:20
  • Compilation.js:1295 hooks.optimizeAssets.callAsync.err [hello]/[webpack]/lib/Compilation.js:1295:35
  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [hello]/[tapable]/lib/Hook.js:154:20
  • Compilation.js:1286 hooks.optimizeChunkAssets.callAsyn c.err
    [hello]/[webpack]/lib/Compilation.js:1286:32
  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [hello]/[tapable]/lib/Hook.js:154:20
  • Compilation.js:1281 hooks.additionalAssets.callAsync.e rr
    [hello]/[webpack]/lib/Compilation.js:1281:36

ERROR in chunk 0
0.dd228d767743d76848f4.js
/home/piotrek/dev/esri/hello/node_modules/arcgis-js-api/views/webgl/BufferObject.js
Cannot read property 'replace' of undefined

ERROR in chunk 1
1.b93d58426cfef4c3c98c.js
/home/piotrek/dev/esri/hello/node_modules/arcgis-js-api/views/3d/support/geometryUtils.js
Cannot read property 'replace' of undefined

ERROR in chunk 2
2.8f8a6737a979cee3510c.js
/home/piotrek/dev/esri/hello/node_modules/arcgis-js-api/views/webgl/FramebufferObject.js
Cannot read property 'replace' of undefined

ERROR in chunk 3
3.c35aae51ee2924963cd9.js
/home/piotrek/dev/esri/hello/node_modules/arcgis-js-api/views/webgl/InstanceCounter.js
Cannot read property 'replace' of undefined

ERROR in chunk 4
4.cfb4f14b056781ec34f1.js
/home/piotrek/dev/esri/hello/node_modules/arcgis-js-api/core/tsSupport/generatorHelper.js
Cannot read property 'replace' of undefined

...and so on...

Context

No fancy things, Just running the template app. Recreated on Windows and Linux.

Your Environment

  • Version used: 4.8.3
  • Browser Name and version: Chrome 69
  • Operating System and version (desktop or mobile): Windows10 with node 10.11/Ubuntu 18.04 with node 8.10

Support for ArcGIS API for JavaScript v4.10

Support for ArcGIS API for JavaScript v4.10

Description

Any plans to upgrade to ArcGIS API for JavaScript v4.10?

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

Web AppBuilder kind of style for Widget

Description

Can the widget be made to look like Web AppBuilder widget (With Header, Header Icon, Moveable, Closable, Resizable)? Sample screenshot enclosed below. Request your expert advise please. Thank you.

web appbuilder widget

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used: 4.9.3
  • Browser Name and version: Mozilla Firefox 63.0.3 (64-bit)
  • Operating System and version (desktop or mobile): Laptop, Microsoft Windows 10 Pro
  • Link to your project if available:

tdd development

Description

Having out of the box tests is great. But they are really slow to launch and do not lend themselves to test driven development. Is there a reason that the server starts and then shuts down rather than watching for changes? I haven't looked into this I wanted to check with you before I did.

print widget lost css formatting

Description

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

ERROR in ./src/client/index.ts Module not found

Webpack cannot find "app" module.

Description

When running npm run build on node v8.9.4, build fails.

Expected Behavior

Build should work out of the box.

Actual Behavior

Build fails.

Possible Fix

Add uppercase to 'app' when importing module in index.ts:
import App from "./widgets/App";

Steps to Reproduce

  1. npm run build

Context

When deploying project to Openshift, build fails but it is working locally.
I assume it is because node version is different.
On Openshift, it is node 8.9.4. On my computer: 8.11.2
After changing the case of the import App from "./widgets/App"`, it solved the issue.

Your Environment

  • Version used: 4.7.4
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

"Zoom to" of popup just centers not zoom

"Zoom to" of popup just centers not zoom

Description

view.popup default action i.e. "zoom-to" do not zoom just centering
image

Expected Behavior

Click on "Zoom To" of popup should Center And Zoom

Actual Behavior

Click on "Zoom To" of popup just Center not Zoom

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used: 4.9.3
  • Browser Name and version: Chrome
  • Operating System and version (desktop or mobile): Desktop
  • Link to your project if available:

External Config

Description

Would it be possible to make the template configuration settings (webmap id etc.) external? Currently the config is in a typescript file and baked into the bundles. This makes it difficult to re-configure an application for different environments.

My current workaround is to add all settings to a config.json file and modify webpack.config.js to ensure it doesn't get bundled:

externals: { appConfig: JSON.stringify(require("./config/config.json")) }

I think something like that in the template would be a useful addition.

Cannot read properties of undefined after update to 4.9

Summary

after updating the cli using npm update I am unable to run a local server or build. The interface produces

"TypeError: Cannot read property 'properties' of undefined"

Description

I've updated the cli to 4.9. I did this by calling npm update. This has updated the following modules

Runnig npm start causes an error (described in section below)

Expected Behavior

Local development should initiate presenting application on browser.

Actual Behavior

The following error occurs:

C:<folderspace>\node_modules\webpack-cli\bin\config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,

TypeError: Cannot read property 'properties' of undefined
at module.exports (C:<folderspace>\node_modules\webpack-cli\bin\config-yargs.js:89:48)
at Object. (C:<folderspace>\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: webpack-dev-server --mode production --open --https --compress
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve 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<username>\AppData\Roaming\npm-cache_logs\2018-09-30T08_50_49_773Z-debug.log

Possible Fix

Related to version of webpack.
run npm install [email protected] to fix

Steps to Reproduce

  1. Create an application using 4.8 cli
  2. Run npm update
  3. Run npm start

Your Environment

  • Version used: 4.9
  • Browser Name and version: Chrome, Edge

Widget CoordinateConversion : ReferenceError: global is not defined

Hello,
I'm trying to implement simple coordinate conversion widget and I get this error.

Code

export function initWidgets(view: esri.MapView | esri.SceneView) {
  const legend = new Legend({ view });
  const layerList = new LayerList({ view });

  view.ui.add(legend, 'bottom-left');
  view.ui.add(layerList, 'top-right');
  view.ui.add(new CoordinateConversion({
    view,
    mode: 'capture',
    multipleConversions: true,
  }), 'bottom-left');

  return view;
}

Thanks!!

Capture

**/__mocks__/' doesn't exist

Description

npm run build gives the following error
image

The folder does appear to exist:
image

Expected Behavior

No errors on build

Actual Behavior

Above

Possible Fix

Might be a windows issue, removing the space appears to fix it. PR coming up

Steps to Reproduce

Context

Your Environment

  • Version used:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

ESRI JS Promise never resolves in intern tests

Test that include an ESRI JS Promise never resolves in intern tests and test fails with the following error:

TimeoutError: Timeout reached on chrome 75.0.3770.100 on Mac OS X - widgets/App/AppViewModel - should resolve ESRI Promise#
      @ node_modules/intern/browser/remote.js:99:10665  

Description

ESRI JS Promise never resolves but "classic" one does resolve and test succeed.
For example, in any test suite add the following sample:

import esriRequest from "esri/request";

test("should resolve ESRI Promise", async () => {
      return esriRequest('https://services.arcgisonline.com/arcgis/rest/services?f=json', {
        responseType: "json"
      }).then(function(response:any){
        assert.equal(response.data.currentVersion, '10.6');
      });
});

 test("should resolve a Promise", () => {
      function solvePromise(resolve:any, reject:any) {
        const req = new XMLHttpRequest();
        req.onreadystatechange = function(event) {
            if (this.readyState === XMLHttpRequest.DONE) {
                if (this.status === 200) {
                    resolve(this.responseText);
                }
            }
        };
        req.open('GET', 'https://services.arcgisonline.com/arcgis/rest/services?f=json', true);
        req.send(null);
      }

      var promise = new Promise(solvePromise);
      return promise.then(function(value:string) {
        assert.equal(JSON.parse(value).currentVersion, '10.6');
      });
});

Test 'should resolve ESRI Promise' never resolve and fails with a timeout error but 'should resolve a Promise' does resolve and test succeeds.

Expected Behavior

ESRI JS Promise should resolve in intern tests and test should be successful.

Actual Behavior

ESRI JS Promise never resolves in intern test and test fails.

Possible Fix

No idea

Steps to Reproduce

  1. Include import esriRequest from "esri/request"; in any test suite
  2. Copy paste the 2 tests described above
  3. Run npm test

Context

I cannot test any function that returns an ESRI JS Promise

Your Environment

  • Version used: 4.11.0
  • Browser Name and version: Chrome Version 75.0.3770.100

Any idea @odoe ? Thanks !

v4.14.0 default template application "arcgis create jsapi-app" not working in IE11

Description

Application generated using the default template application "arcgis create jsapi-app" not working in IE11. Error logged in the browser console is "SCRIPT1010: Expected identifier".

Error1

Error2

Expected Behavior

It should work in IE11

Actual Behavior

Not working in IE11.
Working fine in Chrome.

Possible Fix

Steps to Reproduce

  1. arcgis create jsapi-app
  2. npm start
  3. browse the application in IE11
  4. refer to IE11 developer tools console for details of the issue

Context

Your Environment

  • Version used: 4.14.0
  • Browser Name and version: IE11
  • Operating System and version (desktop or mobile): Win10 Laptop
  • Link to your project if available:

arcgis-api (dojo/dijit/dgrid) not listed as dependencies in package.json

Description

Created an app, cleaned node modules. Re-install. Dojo/dijit/dojo-util and dgrid are all missing. I believe this causes the following error

image

Expected Behavior

The app still builds after cleaning and reinstalling dependencies.

Actual Behavior

Error see image.

Possible Fix

I added "arcgis-js-api": "^4.10.1" as a dependency manually

Steps to Reproduce

  1. Create an app using the cli
  2. Delete node_modules
  3. npm install
  4. App will no longer build due to missing dojo files

Context

Your Environment

  • Version used: 4.10
  • Browser Name and version: Chrome 72
  • Operating System and version (desktop or mobile): Windows 10. Node
  • Link to your project if available:

render() method being triggered so many times and so many occasions

render() method of a custom widget being triggered so many times unnecessarily (I think).

Description

It's been observed that render() method of a custom widget is being triggered so many times. As per my knowledge render() method should invoke only in 3 occasions as listed below.

  1. Whenever a property decorated with @renderable() is modified
  2. An explicit call of a method renderNow()
  3. An explicit call of a method scheduleRender()

Expected Behavior

render() method should be invoked only for the occasions listed in above description.

Actual Behavior

render() method is being called whenever clicking on the widget and after that on the map.
render() method is being called whenever switching windows forth and back (alt + tab) then moving cursor on the map.

Possible Fix

Do not know

Steps to Reproduce

  1. Create a new project using cli (arcgis create TestRender)
  2. Create a new widget using cli (arcgis widget SampleWidget)
  3. In SampleWidget.tsx file, comment @renderable decorator at line number 21 & 27
  4. In render() method add console.log("Called render()"); at line number 31
  5. Instantiate SampleWidget in AppViewModel.ts at line numbers 46 & 47
  6. Run the project using npm start
  7. While application loading in the browser, open developer tools
  8. Click on the widget and map continuously and watch the console section in developer tools

SampleWidget.tsx
image

AppViewModel.ts
image

Console of Browser Developer Tools
image

Context

I think render() method is being called unnecessarily so many times which can overload the application.

Your Environment

  • Version used: 4.9.3
  • Browser Name and version: Chrome 72.0.3626.119 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Microsoft Windows 10 Pro (desktop)
  • Link to your project if available:

How can I import dojo/i18n files ?

Description

Working on app built with this CLI, I am trying to customize a widget view you provide, but nls files are not imported.

import * as i18nCommon from "dojo/i18n!esri/nls/common";
import * as i18n from "dojo/i18n!esri/widgets/Editor/nls/Editor";

Is there any setting that should be modified so that the import work ?

Thanks !

Expected Behavior

nls files should be imported.

Actual Behavior

nls files are not imported so there is no text on the widget

Steps to Reproduce

  1. Copy a widget view provided here
  2. Instantiate the widget using the local view of the widget in your project

Context

Your Environment

  • Version used: 4.11
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project if available:

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.