Aurelia and the dreaded commonJs.convert: COULD NOT CONVERT error - aurelia

Background info:
Aurelia CLI
npm version 3.10.3
node version 6.7.0
Project was created and initially developed by me. Checked in to the customer's git repository. While I was assigned to other tasks, a couple of my co-workers continued working on the project. I'm now back working on this project and the first thing I did was a git pull. After updating my local copy of the source files, etc., I ran au build which produced the following error:
commonJs.convert: COULD NOT CONVERT:
C:/repos/xxxxxx/FrontEnd/src/selectedcustomer.js, so skipping it.
Error was: Error: Line 1: Unexpected token
{ uid: 8,
name: 'writeBundles',
branch: false,
error: { Error: Parse error using esprima for file: C:/repos/xxxxxx/FrontEnd/src/selectedcustomer.js
Error: Line 1: Unexpected token
at Object.context.load (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodrotrace\lib\loade\Loader.js:379:19)
at Object.load (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0),<anonymous>:832:29)
at Object.fetch (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:822:66)
at Object.check (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:854:30)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1173:22)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1554:39)
at Object.context.enable (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:289:24)
at Object.eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0),<anonymous>:1158:33)
at eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:134:23)
at each (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:59:31)
moduleTree: [ 'app' ],
fileName: 'C:/repos/xxxxxx/FrontEnd/src/app.js' },
duration: [ 0, 514590053 ],
time: 1486381456095
}
{ uid: 0,
name: '<series>',
branch: true,
error: { Error: Parse error using esprima for file: C:/repos/xxxxxx/FrontEnd/src/selectedcustomer.js
Error: Line 1: Unexpected token
at Object.context.load (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:379:19)
at Object.load (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:832:29)
at Object.fetch (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:822:66)
at Object.check (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:854:30)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1173:22)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1554:39)
at Object.context.enable (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:289:24)
at Object.eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1158:33)
at eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:134:23)
at each (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:59:31)
moduleTree: [ 'app' ],
fileName: 'C:/repos/xxxxxx/FrontEnd/src/app.js' },
duration: [ 11, 848277505 ],
time: 1486381456113 }
{ Error: Parse error using esprima for file: C:/repos/xxxxxx/FrontEnd/src/selectedcustomer.js
Error: Line 1: Unexpected token
at Object.context.load (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:379:19)
at Object.load (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:832:29)
at Object.fetch (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:822:66)
at Object.check (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:854:30)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1173:22)
at Object.enable (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1554:39)
at Object.context.enable (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:289:24)
at Object.eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:1158:33)
at eval (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0), <anonymous>:134:23)
at each (eval at <anonymous> (C:\repos\xxxxxx\FrontEnd\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:1:0),<anonymous>:59:31)
moduleTree: [ 'app' ],
fileName: 'C:/repos/xxxxxx/FrontEnd/src/app.js' }
Is there someone out there who knows what could be causing this? It builds on my co-workers machines so I'm genuinely at loss as to why I get this error. Also, as long as this isn't resolved I'm not able to work on the project, something my customer isn't too happy about.
Btw, I have tried npm install to no avail.
TIA
--norgie

Related

When trying to sign-in using Google auth, it says: OAuth - Error handling auth response. Error: Internal+server+error

My app have multiple environments (dev, staging, and production). I set up Google Sin-in in the dev environment and everything works fine. But when switched to the staging environment, it breaks. Click on Google sign-in > Click on the google account or sign-in to the google account > Re-direct to the app > The user does not get signed-in. When I check the console, it shows the following error:
next-dev.js?7fd2:24 [ERROR] 08:01.238 OAuth - Error handling auth response. Error: Internal+server+error.+
at OAuth.eval (OAuth.js?ca4e:244:1)
at step (OAuth.js?ca4e:55:1)
at Object.eval [as next] (OAuth.js?ca4e:36:46)
at eval (OAuth.js?ca4e:30:1)
at new Promise (<anonymous>)
at __awaiter (OAuth.js?ca4e:26:1)
at OAuth.handleAuthResponse (OAuth.js?ca4e:220:1)
at AuthClass.eval (Auth.js?134d:2271:1)
at step (Auth.js?134d:55:1)
at Object.eval [as next] (Auth.js?134d:36:46)
at eval (Auth.js?134d:30:1)
at new Promise (<anonymous>)
at __awaiter (Auth.js?134d:26:1)
at AuthClass._handleAuthResponse (Auth.js?134d:2233:1)
at eval (Auth.js?134d:229:1)
at eval (urlListener.js?d88e:17:1)
at AuthClass.configure (Auth.js?134d:223:24)
at eval (Amplify.js?b2f6:84:1)
at Array.map (<anonymous>)
at AmplifyClass.configure (Amplify.js?b2f6:83:1)
at eval (configureAmplify.js?89ed:10:1)
at ./configureAmplify.js (_app.js?ts=1660300676845:34680:1)
at options.factory (webpack.js?ts=1660300676845:698:31)
at __webpack_require__ (webpack.js?ts=1660300676845:37:33)
at fn (webpack.js?ts=1660300676845:353:21)
at eval (_app.js:12:75)
at ./pages/_app.js (_app.js?ts=1660300676845:35758:1)
at options.factory (webpack.js?ts=1660300676845:698:31)
at __webpack_require__ (webpack.js?ts=1660300676845:37:33)
at fn (webpack.js?ts=1660300676845:353:21)
at eval (?9413:5:16)
at eval (route-loader.js?7e94:215:51)
I tried to sign in using another Google account, tried different Google client credentials, updated Amplify auth and went through all the settings. Still nothing worked. I then checked the cloud watch logs. Nothing...
Any idea what's happening?
Log output
// Put your logs below this line
[DEBUG] 25:10.892 AuthClass - Error in cognito hosted auth response Error: Internal+server+error.+
at OAuth.eval (OAuth.js?ca4e:244:1)
at step (OAuth.js?ca4e:55:1)
at Object.eval [as next] (OAuth.js?ca4e:36:46)
at eval (OAuth.js?ca4e:30:1)
at new Promise (<anonymous>)
at __awaiter (OAuth.js?ca4e:26:1)
at OAuth.handleAuthResponse (OAuth.js?ca4e:220:1)
at AuthClass.eval (Auth.js?134d:2271:1)
at step (Auth.js?134d:55:1)
at Object.eval [as next] (Auth.js?134d:36:46)
at eval (Auth.js?134d:30:1)
at new Promise (<anonymous>)
at __awaiter (Auth.js?134d:26:1)
at AuthClass._handleAuthResponse (Auth.js?134d:2233:1)
at eval (Auth.js?134d:229:1)
at eval (urlListener.js?d88e:17:1)
at AuthClass.configure (Auth.js?134d:223:24)
at eval (Amplify.js?b2f6:84:1)
at Array.map (<anonymous>)
at AmplifyClass.configure (Amplify.js?b2f6:83:1)
at eval (configureAmplify.js?89ed:10:1)
at ./configureAmplify.js (_app.js?ts=1660301705941:34680:1)
at options.factory (webpack.js?ts=1660301705941:698:31)
at __webpack_require__ (webpack.js?ts=1660301705941:37:33)
at fn (webpack.js?ts=1660301705941:353:21)
at eval (_app.js:12:75)
at ./pages/_app.js (_app.js?ts=1660301705941:35758:1)
at options.factory (webpack.js?ts=1660301705941:698:31)
at __webpack_require__ (webpack.js?ts=1660301705941:37:33)
at fn (webpack.js?ts=1660301705941:353:21)
at eval (?9413:5:16)
at eval (route-loader.js?7e94:215:51)
instrument.js?1ea2:109 [DEBUG] 25:10.893 Hub - Dispatching to auth with
{event: 'signIn_failure', data: Error: Internal+server+error.+
at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amp…, message: 'The OAuth response flow failed'}
data: Error: Internal+server+error.+ at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:255:35) at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:66:23) at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:47:53) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:41:71) at new Promise (<anonymous>) at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:37:12) at OAuth.handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:231:16) at AuthClass.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2285:65) at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:69:23) at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:50:53) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:44:71) at new Promise (<anonymous>) at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:40:12) at AuthClass._handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2247:16) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:243:23) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/urlListener.js:19:9) at AuthClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:237:69) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:90:18) at Array.map (<anonymous>) at AmplifyClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:89:26) at eval (webpack-internal:///./configureAmplify.js:14:59) at ./configureAmplify.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:34680:1) at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31) at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33) at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21) at eval (webpack-internal:///./pages/_app.js:12:75) at ./pages/_app.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:35758:1) at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31) at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33) at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21) at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_app&page=%2F_app!:5:16) at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/client/route-loader.js:247:16)
message: "Internal+server+error.+"
stack: "Error: Internal+server+error.+\n at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:255:35)\n at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:66:23)\n at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:47:53)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:41:71)\n at new Promise (<anonymous>)\n at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:37:12)\n at OAuth.handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:231:16)\n at AuthClass.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2285:65)\n at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:69:23)\n at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:50:53)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:44:71)\n at new Promise (<anonymous>)\n at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:40:12)\n at AuthClass._handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2247:16)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:243:23)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/urlListener.js:19:9)\n at AuthClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:237:69)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:90:18)\n at Array.map (<anonymous>)\n at AmplifyClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:89:26)\n at eval (webpack-internal:///./configureAmplify.js:14:59)\n at ./configureAmplify.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:34680:1)\n at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31)\n at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33)\n at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21)\n at eval (webpack-internal:///./pages/_app.js:12:75)\n at ./pages/_app.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:35758:1)\n at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31)\n at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33)\n at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21)\n at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_app&page=%2F_app!:5:16)\n at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/client/route-loader.js:247:16)"
[[Prototype]]: Object
event: "signIn_failure"
message: "The OAuth response flow failed"
[[Prototype]]: Object
[DEBUG] 25:10.894 Hub - Dispatching to auth with
{event: 'cognitoHostedUI_failure', data: Error: Internal+server+error.+
at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amp…, message: 'A failure occurred when returning to the Cognito Hosted UI'}
data: Error: Internal+server+error.+ at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:255:35) at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:66:23) at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:47:53) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:41:71) at new Promise (<anonymous>) at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:37:12) at OAuth.handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:231:16) at AuthClass.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2285:65) at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:69:23) at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:50:53) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:44:71) at new Promise (<anonymous>) at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:40:12) at AuthClass._handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2247:16) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:243:23) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/urlListener.js:19:9) at AuthClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:237:69) at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:90:18) at Array.map (<anonymous>) at AmplifyClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:89:26) at eval (webpack-internal:///./configureAmplify.js:14:59) at ./configureAmplify.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:34680:1) at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31) at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33) at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21) at eval (webpack-internal:///./pages/_app.js:12:75) at ./pages/_app.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:35758:1) at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31) at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33) at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21) at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_app&page=%2F_app!:5:16) at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/client/route-loader.js:247:16)
message: "Internal+server+error.+"
stack: "Error: Internal+server+error.+\n at OAuth.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:255:35)\n at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:66:23)\n at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:47:53)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:41:71)\n at new Promise (<anonymous>)\n at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:37:12)\n at OAuth.handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/OAuth/OAuth.js:231:16)\n at AuthClass.eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2285:65)\n at step (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:69:23)\n at Object.eval [as next] (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:50:53)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:44:71)\n at new Promise (<anonymous>)\n at __awaiter (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:40:12)\n at AuthClass._handleAuthResponse (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:2247:16)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:243:23)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/urlListener.js:19:9)\n at AuthClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+auth#4.6.1/node_modules/#aws-amplify/auth/lib-esm/Auth.js:237:69)\n at eval (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:90:18)\n at Array.map (<anonymous>)\n at AmplifyClass.configure (webpack-internal:///./node_modules/.pnpm/#aws-amplify+core#4.6.1/node_modules/#aws-amplify/core/lib-esm/Amplify.js:89:26)\n at eval (webpack-internal:///./configureAmplify.js:14:59)\n at ./configureAmplify.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:34680:1)\n at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31)\n at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33)\n at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21)\n at eval (webpack-internal:///./pages/_app.js:12:75)\n at ./pages/_app.js (http://localhost:3000/_next/static/chunks/pages/_app.js?ts=1660301705941:35758:1)\n at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:698:31)\n at __webpack_require__ (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:37:33)\n at fn (http://localhost:3000/_next/static/chunks/webpack.js?ts=1660301705941:353:21)\n at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_app&page=%2F_app!:5:16)\n at eval (webpack-internal:///./node_modules/.pnpm/next#12.2.2_cqi3zzjnvb643o7ixnrzsbv4xq/node_modules/next/dist/client/route-loader.js:247:16)"
[[Prototype]]: Object
event: "cognitoHostedUI_failure"
message: "A failure occurred when returning to the Cognito Hosted UI"
[DEBUG] 25:11.230 AuthClass - getting current authenticated user
instrument.js?1ea2:109 [DEBUG] 25:11.236 AuthClass - get current authenticated userpool user
instrument.js?1ea2:109 [DEBUG] 25:11.237 AuthClass - Failed to get user from user pool
instrument.js?1ea2:109 [DEBUG] 25:11.237 AuthClass - The user is not authenticated by the error No current user
[DEBUG] 25:11.238 Credentials - removing aws-amplify-federatedInfo from storage
instrument.js?1ea2:109 [DEBUG] 25:11.238 AuthClass - no current Cognito user
instrument.js?1ea2:109 [DEBUG] 25:11.238 Hub - Dispatching to auth with
{event: 'signOut', data: null, message: 'A user has been signed out'}
data: null
event: "signOut"
message: "A user has been signed out"
[[Prototype]]: Object

vue.config.js optimization.splitChunks breaks unit tests in fresh project

Adding splitchunks webpack optimization with maxSize < 1077900 in a freshly initialized vue project breaks unit tests.
vue cli: 3.9.0
webpack: 4.41.5
Anyone have any idea what would cause this?
Files produced in build:
File Size Gzipped
dist/js/chunk-vendors~d939e436.1b1a6c4 89.15 KiB 31.95 KiB
d.js
dist/js/app~d0ae3f07.be737b26.js 4.81 KiB 1.68 KiB
dist/css/app~d0ae3f07.0dca8a5d.css 0.33 KiB 0.23 KiB
yarn run test:unit
WEBPACK Compiling...
[=========================] 98% (after emitting)
DONE Compiled successfully in 2010ms
[=========================] 100% (completed)
WEBPACK Compiled successfully in 2010ms
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (/Project/Path/testvuetest/dist/js/webpack:/webpack/bootstrap:19:1)
at /Project/Path/testvuetest/dist/js/webpack:/webpack/bootstrap:83:1
at Object.<anonymous> (/Project/Path/testvuetest/dist/js/main~._node_modules_#.js:87:10)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object._module2.default._extensions.<computed> [as .js] (/Project/Path/testvuetest/node_modules/mochapack/src/util/registerRequireHook.js:99:12)
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)
at require (internal/modules/cjs/helpers.js:74:18)
at /Project/Path/testvuetest/node_modules/mocha/lib/mocha.js:334:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Project/Path/testvuetest/node_modules/mocha/lib/mocha.js:331:14)
at Mocha.run (/Project/Path/testvuetest/node_modules/mocha/lib/mocha.js:809:10)
at cb (/Project/Path/testvuetest/node_modules/mochapack/src/runner/TestRunner.js:96:21)
at /Project/Path/testvuetest/node_modules/mochapack/src/webpack/compiler/registerReadyCallback.js:12:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Project/Path/testvuetest/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:45:1)
at AsyncSeriesHook.lazyCompileHook (/Project/Path/testvuetest/node_modules/tapable/lib/Hook.js:154:20)
at /Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:304:22
at Compiler.emitRecords (/Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:499:39)
at /Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:298:10
at /Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:485:14
at eval (eval at create (/Project/Path/testvuetest/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /Project/Path/testvuetest/node_modules/copy-webpack-plugin/dist/index.js:115:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Project/Path/testvuetest/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at AsyncSeriesHook.lazyCompileHook (/Project/Path/testvuetest/node_modules/tapable/lib/Hook.js:154:20)
at /Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:482:27
at /Project/Path/testvuetest/node_modules/neo-async/async.js:2818:7
at done (/Project/Path/testvuetest/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Project/Path/testvuetest/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at /Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:464:33
at MemoryFileSystem.writeFile (/Project/Path/testvuetest/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
at writeOut (/Project/Path/testvuetest/node_modules/webpack/lib/Compiler.js:462:30)
at Immediate._onImmediate (/Project/Path/testvuetest/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
at processImmediate (internal/timers.js:439:21)
ERROR mochapack exited with code 1.

Integrating Discogs disconnect node module in Aurelia project

I'm using aurelia.io, and I'd like to use "disconnect" npm package in my app to handle Discogs API.
I install it normally, typing npm install disconnect --save in the folder of my app.
I also edit aurelia.json correctly to insert in the vendor-bundle.js section :
{
"name": "disconnect",
"path": "../node_modules/disconnect",
"main": "index"
},
Then I buikd my app typing au build, but I get this error:
{ uid: 8,
name: 'writeBundles',
branch: false,
error:
{ Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
at Object.fs.openSync (fs.js:558:18)
at Object.fs.readFileSync (fs.js:468:33)
at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
moduleTree: [ 'disconnect/index' ],
fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' },
duration: [ 4, 789092986 ],
time: 1490043332523 }
{ uid: 0,
name: '<series>',
branch: true,
error:
{ Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
at Object.fs.openSync (fs.js:558:18)
at Object.fs.readFileSync (fs.js:468:33)
at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
moduleTree: [ 'disconnect/index' ],
fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' },
duration: [ 8, 704096699 ],
time: 1490043332559 }
{ Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
at Object.fs.openSync (fs.js:558:18)
at Object.fs.readFileSync (fs.js:468:33)
at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
moduleTree: [ 'disconnect/index' ],
fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' }
I don't know what's wrong...
If you can help me, it would be great :)
As it was mentioned in the answer of the Ashley, my problem is irresolvable the way I wanted.
Some node packages are only made for servers and not browsers...

Error from Aurelia CLI command 'au run --watch' when importing 3rd party library

I've installed the third party library https://www.npmjs.com/package/scroll-into-view into my Aurelia CLI project using:
npm install --save scroll-into-view
I've added the following to the dependencies array in aurelia.json:
{
"name": "scroll-into-view",
"path": "../node_modules/scroll-into-view",
"main": "scrollIntoView"
}
I've added the following to the component I want to make use of the library:
import * as scrollIntoView from "scroll-into-view";
When I execute au run --watch I receive a long list of errors, repeating a version of the following:
Error: ENOENT: no such file or directory, open 'C:\src\choiceswizard\src\node_modules\raf.js'
at Object.fs.openSync (fs.js:558:18)
at Object.fs.readFileSync (fs.js:468:33)
at Object.exports.readFileSync (C:\src\choiceswizard\node_modules\aurelia-cli\lib\file-system.js:49:13)
at fileRead (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\bundled-source.js:83:31)
at Object.context.fileRead (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:176:18)
at Object.context.load (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:357:30)
at Module.load (eval at <anonymous> (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), <anonymous>:832:29)
at Module.fetch (eval at <anonymous> (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), <anonymous>:822:66)
at Module.check (eval at <anonymous> (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), <anonymous>:854:30)
at Module.enable (eval at <anonymous> (C:\src\choiceswizard\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:1), <anonymous>:1173:22)
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\src\\choiceswizard\\src\\node_modules\\raf.js',
moduleTree: [ 'scroll-into-view/scrollIntoView' ],
fileName: 'C:/src/choiceswizard/node_modules/scroll-into-view/scrollIntoView.js'
This informed me that scroll-into-view has a dependency on raf https://www.npmjs.com/package/raf while raf has its own dependencies and likely so-on.
Notice that the dependencies are being looked for in root of the C:\src\choiceswizard\src\node_modules\ folder and not in the individual module folders e.g. C:\src\choiceswizard\src\node_modules\raf.
Also, upon further experimentation I discovered that raf uses index.js as its entry-point and as such what appears to be an assumption being made that raf.js is the name of the file is incorrect.
It seems to me like Aurelia CLI is not parsing the package.json of each dependency in the hierarchy and loading them accordingly. I could also be horribly misunderstanding the issue.
Does anyone have any insight that might help me use scroll-into-view in my project?
This package has a dependency which itself has a dependency.
Add the following to the dependencies section of the vendor-bundle config in your aurelia.json file and you'll be good to go:
"performance-now",
"raf",
"scroll-into-view"

Adding estraverse library to an aurelia-cli project causes the build to fail

I have followed the documentation's instructions regarding how to add client libraries to an aurelia-cli project. I have being able to add a couple of them including bootstrap. However, when I tried to add estraverse.js, the build failed with this log:
Starting 'readProjectConfiguration'...
Finished 'readProjectConfiguration'
Starting 'processMarkup'...
Starting 'processCSS'...
Starting 'configureEnvironment'...
Finished 'processCSS'
Finished 'processMarkup'
Finished 'configureEnvironment'
Starting 'buildJavaScript'...
Finished 'buildJavaScript'
Starting 'writeBundles'...
Tracing app...
{ uid: 9,
name: 'writeBundles',
branch: false,
error:
{ Error: ENOENT: no such file or directory,
open 'C:\Users\abdulaziz\Downloads\newProject\life-code\src\package.json.js'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at Object.exports.readFileSync (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\file-system.js:38:13)
at amodroTrace.fileRead (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\bundled-source.js:83:31)
at Object.context.fileRead (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:176:18)
at Object.context.load (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:357:30)
at Object.Module.load (eval at <anonymous> (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:9), <anonymous>:832:29)
at Object.Module.fetch (eval at <anonymous> (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:9), <anonymous>:822:66)
at Object.Module.check (eval at <anonymous> (C:\Users\abdulaziz\Downloads\newProject\life-code\node_modules\aurelia-cli\lib\build\amodro-trace\lib\loader\Loader.js:14:9), <anonymous>:854:30)
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\abdulaziz\\Downloads\\newProject\\life-code\\src\\package.json.js',
moduleTree: [ 'estraverse' ],
fileName: 'C:/Users/abdulaziz/Downloads/newProject/life-code/node_modules/estraverse/estraverse.js' },
duration: [ 1, 52233832 ],
time: 1471898227440 }
I think it tries to load .json file but fails to do so. Anyone has any idea how to fix this?
This is my attempt :
In Aurelia.json, I added .json to plugin in the loader section:
"loader": {
"type": "require",
"configTarget": "vendor-bundle.js",
"includeBundleMetadataInConfig": "auto",
"plugins": [
{
"name": "text",
"extensions": [
".html",
".css",
".json"
],
"stub": true
}
]
},
But did not work!