[Pkg-javascript-devel] packaging node mermaid: Recursion in resolving module

Xavier yadd at debian.org
Sat Jul 20 12:41:51 BST 2019


Le 20/07/2019 à 12:47, Nilesh Patra a écrit :
> Hi
> While packaging node-mermaid and resolving relevant paths. I experience
> several of these errors:
> 
> WARNING in ./src/themes ^\.\/.*\/index\.scss$
>     Module not found: Error: Recursion in resolving
>     Stack:
>       resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader
>       new-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader
>       parsed-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader module
>       described-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader module
>       raw-module: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader
>       module: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid) css-to-string-loader
>       resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules) ./css-to-string-loader
>       new-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules) ./css-to-string-loader
>       parsed-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules) ./css-to-string-loader
>       described-resolve: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules) ./css-to-string-loader
>       relative: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules/css-to-string-loader) 
>       described-relative: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules/css-to-string-loader) 
>       raw-file: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules/css-to-string-loader) 
>       file: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules/css-to-string-loader) 
>       relative: (/home/nilesh/mermaidpack/reversion/node-mermaid-8.1.0/node-mermaid/node_modules/css-to-string-loader) 
>      @ ./src/themes ^\.\/.*\/index\.scss$
>      @ ./src/mermaidAPI.js
>      @ ./src/mermaid.js
> 
> It would be great if someone can letme know what that means and how to
> go about it.
> Here's the complete log if needed: http://paste.debian.net/1092431/
> This is the local repository where I'm working on:
> https://salsa.debian.org/gi-boi-guest/node-mermaid

Hello,

first apply this:

diff --git a/debian/control b/debian/control
index 41b8b45..e12280f 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,11 @@ Build-Depends:
  debhelper (>= 10)
  , nodejs (>= 6)
  , node-babel-cli
+ , node-babel-loader
  , node-babel-preset-env
+ , node-buble
+ , node-css-loader
+ , webpack
 Standards-Version: 4.4.0
 Homepage: https://github.com/knsv/mermaid#readme
 Vcs-Git: https://salsa.debian.org/js-team/node-mermaid.git
diff --git a/debian/rules b/debian/rules
index 5497d82..0ad3d22 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,9 @@ export NODE_PATH := ${CURDIR}
 override_dh_auto_build:
        buble webpack.config.babel.js -o webpack.config.js
        mkdir node_modules
-       ln -s scope-css node_modules/scope-css
-       ln -s moment-mini node_modules/moment-mini
-       ln -s css-to-string-loader node_modules/css-to-string-loader
+       ln -s ../scope-css node_modules/
+       ln -s ../moment-mini node_modules/
+       ln -s ../css-to-string-loader node_modules/
        webpack

 #override_dh_auto_test:


Then error is now:
    WARNING in ./src/themes ^\.\/.*\/index\.scss$
    Module not found: Error: Can't resolve 'sass-loader' in
'/<<PKGBUILDDIR>>'

Cheers,
Xavier



More information about the Pkg-javascript-devel mailing list