question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack seems like it can't resolve path and therefore fails to compile

See original GitHub issue

🐛 Bug Report

After some days off and a fresh installed Ubuntu 20.04, i’ve wanted to clone my aurelia2 repo but if i want to “npm start”, i’m getting an error. Same happens if i try to make a new aurelia 2 project. nodejs v10.19.0 npm 6.14.4 webpack 5.11.1 i’m coding with vsc

I’ve changed absolutley nothing, just “npx makes aurelia” with default ts settings and tried to start and this is the outcome…

./src/main.ts 39 bytes [not cacheable] [built] [code generated] [1 error] ./node_modules/webpack/hot/ sync nonrecursive ^\.\/log$ 170 bytes [built] [code generated] ERROR in ./src/main.ts Module build failed (from ./node_modules/@aurelia/webpack-loader/dist/cjs/index.js): /home/andre/Projects/test/node_modules/@aurelia/kernel/dist/cjs/di.js:67 return new ContainerConfiguration(config.inheritParentResources ?? false, config.defaultResolver ?? exports.DefaultResolver.singleton);

SyntaxError: Unexpected token ? at new Script (vm.js:83:7) at NativeCompileCache._moduleCompile (/home/andre/Projects/test/node_modules/v8-compile-cache/v8-compile-cache.js:240:18) at Module._compile (/home/andre/Projects/test/node_modules/v8-compile-cache/v8-compile-cache.js:184:36) 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 Module.require (internal/modules/cjs/loader.js:692:17) at require (/home/andre/Projects/test/node_modules/v8-compile-cache/v8-compile-cache.js:159:20) at Object.<anonymous> (/home/andre/Projects/test/node_modules/@aurelia/kernel/dist/cjs/index.js:5:17)

Maybe someone allready encountered that or do know a solution for this issue?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Jan 7, 2021

@timfish @3cp you made my day, worked like a charm

1reaction
3cpcommented, Jan 6, 2021

See #1081

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack suddenly fails to compile due to "Module not found ...
It's an issue with the Webpack or Jest configuration. Absolute and relative paths can both be used, but be aware that they will...
Read more >
Can't resolve 'fs' when bundle with webpack #447 - GitHub
I got this error when using the "fetch" library from npm. At first I got the same error but with other packages (...
Read more >
Module Resolution - webpack
A resolver is a library which helps in locating a module by its absolute path. A module can be required as a dependency...
Read more >
can't resolve 'fs' in electron | The AI Search Engine You Control
Check your webpack.config.js . Looks like you target is not electron-main or electron-renderer . Open side panel. Module not found: Error: Can't resolve...
Read more >
How to transpile ES modules with webpack and Node.js
Transpiling in Node.js. ESM comes with a transpiler loader by default that converts code from sources the Node runtime does not understand into ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found