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.

Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'

See original GitHub issue

tns info ✔ Component nativescript has 8.0.2 version and is up to date. ✔ Component @nativescript/core has 8.0.8 version and is up to date. ✔ Component @nativescript/ios has 8.0.0 version and is up to date. ✖ Component @nativescript/android is not installed.

  • XCode Version: 12.5.1
  • macOS: 11.4

Describe the bug I followed the examples and successfully created an app with

tns create HelloWorld --template @nativescript/template-hello-world-ts

Then I tried to build it but get an error for web pack:

tns build ios
tns build ios
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 393 packages, and audited 394 packages in 13s

39 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Copying template files...
Platform ios successfully added. v8.0.0
Preparing project...
Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'
Require stack:
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/plugin-webpack5.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/plugin.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/index.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/configuration/vue.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/configuration/index.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/index.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/webpack.config.js
- /Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/bin/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/plugin-webpack5.js:6:42)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/plugin-webpack5.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/plugin.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/vue-loader/lib/index.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/configuration/vue.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/configuration/index.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/index.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/webpack.config.js',
    '/Volumes/SDDPCIE2TB/Projects/NativeScript/HelloWorld/node_modules/@nativescript/webpack/dist/bin/index.js'
  ]
}
No configuration!

To Reproduce

tns clean    
tns build ios

Expected behavior No error

Sample project

tns create HelloWorld --template @nativescript/template-hello-world-ts

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maziaccommented, Sep 22, 2021

Seems the problem is gone now. I did create a complete new HelloWorld app with

ns create HelloWorld --template @nativescript/template-hello-world-ts

and then did a

ns build ios 
ns run ios  

and it build and run without an error.

I guess the problem was that I uses tns instead of ns in the beginning.

Many thanks for your help.

0reactions
rigor789commented, Sep 22, 2021

@maziac please push that project to a GitHub repo, seems something isn’t quite right. You shouldn’t need nativescript-vue nor nativescript-vue-template-compiler if you are not using Vue, and from the logs, seems like this is a ts project (@nativescript/template-hello-world-ts).

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Error: Cannot find module 'webpack/lib/rules ...
I have to manually update the vue-loader:^15.9.8 in the package JSON to solve the error. Then do yarn and yarn dev or npm...
Read more >
Error: Cannot find module 'webpack/lib/rules ... - GitHub
I started getting this error after ns clean and then ns run ios Copying ... find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin' ...
Read more >
Error: Cannot find module 'webpack/lib/rules ... - Code Grepper
cannot find module 'webpack/lib/rules/descriptiondatamatcherruleplugin'. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On ...
Read more >
Solución | Cannot find module 'webpack/lib/rules ... - YouTube
Solución a error al ejecutar comando 'npm run dev' en un proyecto de laravel: Cannot find module ...
Read more >
[Solved]-When i try to add vue js in laravel shows an error
[Solved]-When i try to add vue js in laravel shows an error -> Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'-Vue.js.
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