Aurelia CLI build failing on source maps - aurelia

Aurelia CLI build/run is producing the following error. Not too sure what the issue is. au build or au run produces this message in the build log. I did a fresh pull from the repo and ran npm install.
au run
Starting 'readProjectConfiguration'...
Finished 'readProjectConfiguration'
Starting 'processMarkup'...
Starting 'processCSS'...
Starting 'processFontAwesome'...
Starting 'copyFiles'...
Starting 'processGlyphicons'...
Starting 'processImages'...
Starting 'configureEnvironment'...
Finished 'copyFiles'
Finished 'processCSS'
Finished 'processImages'
Finished 'configureEnvironment'
Starting 'buildJavaScript'...
Finished 'processGlyphicons'
Finished 'processFontAwesome'
Finished 'processMarkup'
Finished 'buildJavaScript'
Starting 'writeBundles'...
Tracing app...
Tracing environment...
Tracing main...
Tracing actions/actions...
Tracing application/application...
Tracing chat/chat...
Tracing common/checkbox...
Tracing common/home...
Tracing customer/banking...
Tracing customer/employment...
Tracing customer/extended...
Tracing customer/income...
Tracing customer/personal...
Tracing customersnapshot/customerSnapshot...
Tracing flags/flags...
Tracing lead/banking...
Tracing lead/employment...
Tracing lead/extended...
Tracing lead/income...
Tracing lead/leadDisplay...
Tracing lead/personal...
Tracing loanmarks/loanMarks...
Tracing loans/loans...
Tracing login/login...
Tracing notes/notes...
Tracing resources/index...
Tracing savedbanks/savedBanks...
Tracing testFolder/testShowData...
Tracing tickets/tickets...
Tracing resources/attributes/datepicker...
Tracing resources/common/common...
Tracing resources/value-converters/currency-format...
Tracing resources/value-converters/date-format...
Tracing resources/value-converters/phone-format...
Tracing resources/value-converters/ssn-format...
Tracing resources/dialogs/previousAppDetails...
Tracing resources/dialogs/signatureStatus...
Tracing app...
Tracing actions/actions...
Tracing application/application...
Tracing common/checkbox...
Tracing common/home...
Tracing chat/chat...
Tracing customer/banking...
Tracing customer/customerDisplay...
Tracing customer/employment...
Tracing customer/extended...
Tracing customer/income...
Tracing customer/personal...
Tracing customersnapshot/customerSnapshot...
Tracing flags/flags...
Tracing lead/banking...
Tracing lead/employment...
Tracing lead/extended...
Tracing lead/income...
Tracing lead/leadDisplay...
Tracing lead/personal...
Tracing loanmarks/loanMarks...
Tracing loans/loans...
Tracing login/login...
Tracing notes/notes...
Tracing savedbanks/savedBanks...
Tracing testFolder/testShowData...
Tracing tickets/tickets...
Tracing resources/dialogs/addNote...
Tracing resources/dialogs/ebureau...
Tracing resources/dialogs/followUp...
Tracing resources/dialogs/incentives...
Tracing resources/dialogs/previousAppDetails...
Tracing resources/dialogs/prompt...
Tracing resources/dialogs/signatureStatus...
Tracing resources/dialogs/supportTicket...
Tracing resources/dialogs/tooltip...
Tracing resources/dialogs/transition...
Tracing aurelia-bootstrapper...
Tracing aurelia-history-browser...
Tracing aurelia-loader-default...
Tracing aurelia-logging-console...
Tracing aurelia-pal-browser...
Tracing aurelia-templating-binding...
Tracing text...
Tracing aurelia-templating-resources...
Tracing aurelia-templating-router...
Tracing aurelia-testing...
Tracing bootstrap...
Tracing bootstrap/css/bootstrap...
Failed to write the bundle
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:110:12)
at C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:60:28
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-consumer.js:157:14)
at Concat.add (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:58:18)
at work.then (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\bundle.js:207:16)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
{ uid: 13,
name: 'writeBundles',
branch: false,
error: Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:110:12)
at C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:60:28
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-consumer.js:157:14)
at Concat.add (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:58:18)
at work.then (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\bundle.js:207:16)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7),
duration: [ 2, 119329046 ],
time: 1515005810432 }
{ uid: 1,
name: '<series>',
branch: true,
error: Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:110:12)
at C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:60:28
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-consumer.js:157:14)
at Concat.add (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:58:18)
at work.then (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\bundle.js:207:16)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7),
duration: [ 4, 175263924 ],
time: 1515005810433 }
{ uid: 0,
name: '<series>',
branch: true,
error: Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:110:12)
at C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:60:28
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-consumer.js:157:14)
at Concat.add (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:58:18)
at work.then (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\bundle.js:207:16)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7),
duration: [ 4, 177157338 ],
time: 1515005810434 }
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-generator.js:110:12)
at C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:60:28
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] ( C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\source-map\lib\source-map-consumer.js:157:14)
at Concat.add (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\concat-with-sourcemaps\index.js:58:18)
at work.then (C:\Users\charbaugh\Source\Repos\WebUi3\node_modules\aurelia-cli\lib\build\bundle.js:207:16)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
If we change the sourcemaps option in the aurelia.json as below then the error goes away, but there are no source maps.
"options": {
"minify": "stage & prod",
"sourcemaps": "dev & stage"
},
"options": {
"minify": "stage & prod",
"sourcemaps": ""
},

Related

node:events:505 throw er; // Unhandled 'error' event while running graph-cli

I have been trying to run the graph npm package. However, whenever I run the command I get the following error. I use WSL2 if that is relevant.
`
node:events:505
throw er; // Unhandled 'error' event
^
Error: failed to connect to [localhost:27017]
at exports.ConnectionPool. (/usr/local/lib/node_modules/graph-cli/node_modules/mongodb/lib/mongodb/connection/server.js:556:25)
at exports.ConnectionPool.emit (node:events:527:28)
at exports.ConnectionPool.emit (node:domain:475:12)
at exports.Connection. (/usr/local/lib/node_modules/graph-cli/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
at exports.Connection.emit (node:events:527:28)
at exports.Connection.emit (node:domain:475:12)
at Socket. (/usr/local/lib/node_modules/graph-cli/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on NativeConnection instance at:
at NativeConnection.Connection.error (/usr/local/lib/node_modules/graph-cli/node_modules/mongoose/lib/connection.js:389:8)
at /usr/local/lib/node_modules/graph-cli/node_modules/mongoose/lib/connection.js:416:14
at /usr/local/lib/node_modules/graph-cli/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:57:21
at /usr/local/lib/node_modules/graph-cli/node_modules/mongodb/lib/mongodb/db.js:286:18
at /usr/local/lib/node_modules/graph-cli/node_modules/mongodb/lib/mongodb/db.js:365:7
at processTicksAndRejections (node:internal/process/task_queues:78:11)
`
It's not clear to me why this is happening and I have been struggling to debug this for the last 2 days. Please help!
I have tried running mongodb which then starts up a server on that port, but then the graph command just stay stuck
I have tried upgrading the mongoose version
I have tried reinstalling graph-cli

every command begin with npm has issue

Here is my problem,
I think I made mistake by adding proxy settings in a wrong way,
now every command begin with npm does not work.
here is a pic of the error:
λ npm config set registry "http://registry.npmjs.org/"
Error: Failed parsing JSON config key "proxy: "="'http://xxx.xx.xx.xx:8080'"
at parseField (E:\nodejs\node_modules\npm\lib\config\core.js:376:13)
at E:\nodejs\node_modules\npm\lib\config\core.js:330:24
at Array.forEach (<anonymous>)
at Conf.add (E:\nodejs\node_modules\npm\lib\config\core.js:328:23)
at ConfigChain.addString (E:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
at Conf.<anonymous> (E:\nodejs\node_modules\npm\lib\config\core.js:316:10)
at E:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
Error: Failed parsing JSON config key "proxy: "="'http://xxx.xx.xx.xx:8080'"
at parseField (E:\nodejs\node_modules\npm\lib\config\core.js:376:13)
at E:\nodejs\node_modules\npm\lib\config\core.js:330:24
at Array.forEach (<anonymous>)
at Conf.add (E:\nodejs\node_modules\npm\lib\config\core.js:328:23)
at ConfigChain.addString (E:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
at Conf.<anonymous> (E:\nodejs\node_modules\npm\lib\config\core.js:316:10)
at E:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
Assuming you set your proxy setting in a similar way to the registry setting you show: Delete the proxy line in your .npmrc file and try again. The .npmrc file can be found in the four places listed in the npm docs. In most cases, you'll find the one with the proxy entry in ~/.npmrc.

React-native/hermes build error. no such file or directory: index.android.bundle.packager.map

Description
Getting the following messages during build with hermesEnabled set to true
('...' represent removed text):
(full error log is here)
android\app\build\generated\assets\react\release\index.android.bundle:13:134: warning: the variable "Promise" was not declared in function "isBoldTextEnabled"
...
android\app\build\generated\assets\react\release\index.android.bundle:27:2907: warning: the variable "DebuggerInternal" was not declared in function "value 14#"
...
android\app\build\generated\assets\react\release\index.android.bundle:92:57773: warning: the variable "setTimeout" was not declared in function "wi"
...
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open 'android\app\build\intermediates\sourcemaps\react\release\index.android.bundle.packager.map'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at Object.<anonymous> (C:\esites-grocery\test2.hermes\plumpclient\node_modules\react-native\scripts\compose-source-maps.js:33:43)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
FAILURE: Build failed with an exception.
* Where:
Script 'node_modules\react-native\react.gradle' line: 191
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'cmd'' finished with non-zero exit value 1
(The referenced file exists, at least after the build failed).
Environment
Building on Windows 10
React Native version: 0.62.2
What I tried to do
Tried to bump soLoader to 0.8.0 and to 0.8.2 (although this is not supposed to be needed in RN 0.62.2) as suggested in https://github.com/facebook/react-native/issues/25927#issuecomment-539415154
Modifying the following extra packages definition in build.gradle:
extraPackagerArgs: ["--sourcemap-output", "$buildDir/intermediates/assets/release/index.android.bundle.map"]
to
extraPackagerArgs: ["--sourcemap-output", "$buildDir/intermediates/sourcemaps/react/release/index.android.bundle.packager.map"]
Fixed the error (the warnings are still there).
An APK is created and is running..
./gradlew clean
After doing the ./gradlew clean It worked for me.
OR
For Windows:
gralde clean

Node.js/ webpack/ getaddrinfo looking for internet when not needed, why?

I've got an issue with a machine that's supposed to be able to run offline.
I can pull the cable after my application is running, but during unplugged start I get the following error:
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:443
May 6 23:04:50 myco serve[4121]: at Object._errnoException (util.js:1022:11)
May 6 23:04:50 myco serve[4121]: at errnoException (dns.js:55:15)
May 6 23:04:50 myco serve[4121]: at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
May 6 23:04:50 myco serve[4121]: (node:4121) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It appears that dns.js is part of webpack/node-libs-browser but thats as far as I can seem to figure out.... I can't find GetAddrInfoReqWrap anywhere in my source tree, or getaddrinfo for that matter. Searching around there's a lot of info with people getting similar errors when deliberately trying to use npm, but thats not what I'm doing. I should have everything I need already on the machine.
Apparently this is a problem with serve.
Serve >6.5.3 apparently has an issue where it tries to contact the registry. Downgrade of serve to 6.5.3 solves this particular issue.
this is documented in https://github.com/zeit/serve/issues/348
not sure why serve would need to contact the registry.
noafterglow is right, but just for reference, rolling back to version 6.5.3 of serve can be accomplished with
npm install -g serve#6.5.3
Source: this post
I ran into exactly this error when trying to serve a VueJs app from a different VM from where the code was developed originally.
The file vue.config.js read :
module.exports = {
devServer: {
host: 'tstvm01',
port: 3030,
},
};
When served on the original machine the start up output is :
App running at:
- Local: http://tstvm01:3030/
- Network: http://tstvm01:3030/
Using the same settings on a VM tstvm07 got me a very similar error to the one the OP describes:
INFO Starting development server...
10% building modules 1/1 modules 0 activeevents.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN
at Object._errnoException (util.js:1022:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
If it ain't already obvious, changing vue.config.js to read ...
module.exports = {
devServer: {
host: 'tstvm07',
port: 3030,
},
};
... solved the problem.

create-react-app circle build failed

!/bin/bash -eo pipefail
yarn build
yarn run v1.6.0
$ react-scripts build
Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
events.js:183
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:364:12)
at PoolWorker.writeJson (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:89:22)
at PoolWorker.run (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:69:12)
at WorkerPool.distributeJob (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:326:20)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/queue.js:10:5
at Object.process (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/queue.js:175:17)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/queue.js:115:15
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
at callback (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:163:21)
at /home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:190:15
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/map.js:32:9
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/once.js:12:16
at replenish (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:61:25)
at iterateeCallback (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:50:17)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/map.js:29:13
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1