Current behavior:
When building using Typescript and Webpack I get the following two warnings below. No errors, however when browsing to the site I get the following error in the devtools console window "Error: Unable to find module with ID: aurelia-pal-browser"
WARNING in ./node_modules/aurelia-pal-nodejs/dist/index.js 86:39-56
Critical dependency: the request of a dependency is an expression
@ ./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js
WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
@ ./node_modules/express/lib/application.js 22:11-28
@ ./node_modules/express/lib/express.js 18:12-36
@ ./node_modules/express/index.js 11:0-41
@ ./node_modules/net-browserify/api.js 4:14-32
@ ./node_modules/forever-agent/index.js 6:10-24
@ ./node_modules/request/request.js 14:19-43
@ ./node_modules/request/index.js 143:18-38
@ ./node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js 2:16-34
@ ./node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js 6:32-91
@ ./node_modules/jsdom/lib/api.js 16:23-78
@ ./node_modules/aurelia-pal-nodejs/dist/nodejs-pal-builder.js 6:16-32
@ ./node_modules/aurelia-pal-nodejs/dist/index.js 5:29-60 6:27-58
@ ./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js
Expected/desired behavior:
I would expect the site to load and run fine.
I found some example code in a closed issue and the webpack.config.js file included target: "web". I didn't have this set. After setting it, this issue is resolved.
I'm submitting a bug report
Please tell us about your environment:
Operating System: Windows 10
Node Version: 16.4.2
NPM Version: 7.18.1
JSPM OR Webpack AND Version webpack 5.43.0
Browser: all
Language: TypeScript 4.3.5
Current behavior: When building using Typescript and Webpack I get the following two warnings below. No errors, however when browsing to the site I get the following error in the devtools console window "Error: Unable to find module with ID: aurelia-pal-browser"
WARNING in ./node_modules/aurelia-pal-nodejs/dist/index.js 86:39-56 Critical dependency: the request of a dependency is an expression @ ./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js
WARNING in ./node_modules/express/lib/view.js 81:13-25 Critical dependency: the request of a dependency is an expression @ ./node_modules/express/lib/application.js 22:11-28 @ ./node_modules/express/lib/express.js 18:12-36 @ ./node_modules/express/index.js 11:0-41 @ ./node_modules/net-browserify/api.js 4:14-32 @ ./node_modules/forever-agent/index.js 6:10-24 @ ./node_modules/request/request.js 14:19-43 @ ./node_modules/request/index.js 143:18-38 @ ./node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js 2:16-34 @ ./node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js 6:32-91 @ ./node_modules/jsdom/lib/api.js 16:23-78 @ ./node_modules/aurelia-pal-nodejs/dist/nodejs-pal-builder.js 6:16-32 @ ./node_modules/aurelia-pal-nodejs/dist/index.js 5:29-60 6:27-58 @ ./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js
Expected/desired behavior: I would expect the site to load and run fine.