@The issue with upgrading Arcgis/core from 4.23.1 to 4.27.6

716
1
08-03-2023 12:17 AM
HHAO
by
New Contributor II

I am using the Vue framework. When I upgrade from 4.23.1 to 4.26.7, my project cannot be started and an error will be reported

error in ./node_modules/@arcgis/core/core/typedArrayUtil.js

Module parse failed: Unexpected token (5:99) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | See https://js.arcgis.com/4.27/esri/copyright.txt for details. | */

import"./has.js";function n(n){return n instanceof ArrayBuffer}function r(n){return"Int8Array"===n?.constructor?.name}function t(n){return"Uint8Array"===n?.constructor?.name}function u(n){return"Uint8ClampedArray"===n?.constructor?.name}function o(n){return"Int16Array"===n?.constructor?.name}function c(n){return"Uint16Array"===n?.constructor?.name}function e(n){return"Int32Array"===n?.constructor?.name}function a(n){return"Uint32Array"===n?.constructor?.name}function i(n){return"Float32Array"===n?.constructor?.name}function f(n){return"Float64Array"===n?.constructor?.name}function s(n){return!("buffer"in n)}function m(n){return null!=n?s(n)?8*n.length+12:n.byteLength+y:0}const y=145,A=1024;function l(n){return f(n)||i(n)||e(n)||o(n)||r(n)}function U(n){return f(n)||i(n)}function h(n){return f(n)?179769e303:i(n)?3402823e32:a(n)?4294967295:c(n)?65535:t(n)||u(n)?255:e(n)?2147483647:o(n)?32767:r(n)?127:256}export{A as NATIVE_ARRAY_MAX_SIZE,m as estimateSize,s as isArray,n as isArrayBuffer,U as isFloat,i as isFloat32Array,f as isFloat64Array,o as isInt16Array,e as isInt32Array,r as isInt8Array,l as isSigned,c as isUint16Array,a as isUint32Array,t as isUint8Array,u as isUint8ClampedArray,h as maximumValue,y as typedArrayStaticSize}; |

@ ./node_modules/@arcgis/core/core/lang.js 5:41-248 5:1593-1594 5:1599-1600 5:1605-1606 5:1611-1612 5:1617-1618 5:1623-1624 5:1629-1630 5:1635-1636 5:1641-1642 @ ./node_modules/@arcgis/core/geometry/SpatialReference.js @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/resettlement/landmanage/landLandslicing/index.vue?vue&type=script&lang=js& @ ./src/views/resettlement/landmanage/landLandslicing/index.vue?vue&type=script&lang=js& @ ./src/views/resettlement/landmanage/landLandslicing/index.vue @ ./src sync ^./.*.vue$ @ ./src/utils/util.js @ ./src/permission.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://10.7.9.128:3000/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

1 Reply
AndyGup
Esri Regular Contributor

Hi @HHAO here's documentation with information and instructions on how to workaround that transpilation error: https://github.com/Esri/jsapi-resources/tree/main/esm-samples/webpack#known-issues. Version 4.24 was the first version of the SDK to use ES2020, and that allowed us to use new JavaScript features that create parsing errors in older versions of Webpack.

0 Kudos