Project

General

Profile

Actions

Bug #1657

closed

NPM errors at install

Added by Alexander Watzinger about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
2022-03-15
Estimated time:
Found in version:

Description

There are multiple issues but I guess they are related.

Warnings at NPM install

npm install

I tried to solve this with following commands but it didn't helped:
npm audit fix
npm audit fix --force

Installation failed

Running

npm run export

failed before and after trying to fix with npm audit with the message
โœ– Nuxt Fatal Error
TypeError: micromatch.scan is not a function

I add more output about these two issues as note. Let me know if you need more information.

Actions #1

Updated by Alexander Watzinger about 2 years ago

Warnings when running npm audit

# npm audit report

glob-parent  <5.1.2
Severity: high
Regular expression denial of service - https://github.com/advisories/GHSA-ww39-953v-wcq6
fix available via `npm audit fix --force`
Will install nuxt@2.13.3, which is a breaking change
node_modules/watchpack-chokidar2/node_modules/glob-parent
  chokidar  1.0.0-rc1 - 2.1.8
  Depends on vulnerable versions of glob-parent
  node_modules/watchpack-chokidar2/node_modules/chokidar
    watchpack-chokidar2  *
    Depends on vulnerable versions of chokidar
    node_modules/watchpack-chokidar2
      watchpack  1.7.2 - 1.7.5
      Depends on vulnerable versions of watchpack-chokidar2
      node_modules/watchpack
        webpack  4.44.0 - 4.46.0
        Depends on vulnerable versions of watchpack
        node_modules/webpack
          @nuxt/webpack  *
          Depends on vulnerable versions of cssnano
          Depends on vulnerable versions of webpack
          node_modules/@nuxt/webpack
            @nuxt/builder  >=2.14.0
            Depends on vulnerable versions of @nuxt/webpack
            node_modules/@nuxt/builder
            nuxt  >=2.14.0
            Depends on vulnerable versions of @nuxt/webpack
            node_modules/nuxt

nth-check  <2.0.1
Severity: moderate
Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr
fix available via `npm audit fix --force`
Will install nuxt@2.13.3, which is a breaking change
node_modules/nth-check
  css-select  <=3.1.0
  Depends on vulnerable versions of nth-check
  node_modules/css-select
    svgo  1.0.0 - 1.3.2
    Depends on vulnerable versions of css-select
    node_modules/svgo
      postcss-svgo  4.0.0-nightly.2020.1.9 - 5.0.0-rc.2
      Depends on vulnerable versions of svgo
      node_modules/postcss-svgo
        cssnano-preset-default  <=4.0.8
        Depends on vulnerable versions of postcss-svgo
        node_modules/cssnano-preset-default
          cssnano  4.0.0-nightly.2020.1.9 - 4.1.11
          Depends on vulnerable versions of cssnano-preset-default
          node_modules/cssnano
            @nuxt/webpack  *
            Depends on vulnerable versions of cssnano
            Depends on vulnerable versions of webpack
            node_modules/@nuxt/webpack
              @nuxt/builder  >=2.14.0
              Depends on vulnerable versions of @nuxt/webpack
              node_modules/@nuxt/builder
              nuxt  >=2.14.0
              Depends on vulnerable versions of @nuxt/webpack
              node_modules/nuxt
            optimize-css-assets-webpack-plugin  3.2.1 || 5.0.0 - 5.0.8
            Depends on vulnerable versions of cssnano
            node_modules/optimize-css-assets-webpack-plugin

trim-newlines  <3.0.1
Severity: high
Regular Expression Denial of Service in trim-newlines - https://github.com/advisories/GHSA-7p7h-4mm5-852v
fix available via `npm audit fix`
node_modules/meow/node_modules/trim-newlines
node_modules/trim-newlines
  meow  3.4.0 - 5.0.0
  Depends on vulnerable versions of trim-newlines
  node_modules/git-semver-tags/node_modules/meow
  node_modules/meow
    git-semver-tags  1.3.4 - 3.0.1
    Depends on vulnerable versions of meow
    node_modules/git-semver-tags

18 vulnerabilities (7 moderate, 11 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Actions #2

Updated by Alexander Watzinger about 2 years ago

Error output when trying to install with npm run export

> openatlas_discovery@0.0.1 export
> nuxt-ts generate

 WARN  When using nuxt generate, you should set target: 'static' in your nuxt.config                                                                                                                                                                15:19:23
       ๐Ÿ‘‰ Learn more about it on https://go.nuxtjs.dev/static-target

โ„น Parsed 1 files in 0.3 seconds                                                                                                                                                                                                       @nuxt/content 15:19:24
โ„น Production build                                                                                                                                                                                                                                  15:19:25
โ„น Bundling only for client side                                                                                                                                                                                                                     15:19:25
โ„น Target: static                                                                                                                                                                                                                                    15:19:25

 FATAL  micromatch.scan is not a function                                                                                                                                                                                                           15:19:25

  at Object.getPatternParts (node_modules/fast-glob/out/utils/pattern.js:139:32)
  at PartialMatcher._getPatternSegments (node_modules/fast-glob/out/providers/matchers/matcher.js:30:37)
  at PartialMatcher._fillStorage (node_modules/fast-glob/out/providers/matchers/matcher.js:19:35)
  at new Matcher (node_modules/fast-glob/out/providers/matchers/matcher.js:10:14)
  at new PartialMatcher (node_modules/fast-glob/out/providers/matchers/partial.js:4:1)
  at DeepFilter._getMatcher (node_modules/fast-glob/out/providers/filters/deep.js:16:16)
  at DeepFilter.getFilter (node_modules/fast-glob/out/providers/filters/deep.js:11:30)
  at ProviderAsync._getReaderOptions (node_modules/fast-glob/out/providers/provider.js:25:41)
  at ProviderAsync.read (node_modules/fast-glob/out/providers/async.js:12:30)
  at Array.map (<anonymous>)
  at getWorks (node_modules/fast-glob/out/index.js:59:18)
  at FastGlob (node_modules/fast-glob/out/index.js:11:19)
  at node_modules/globby/index.js:133:52
  at Array.map (<anonymous>)
  at Object.module.exports [as default] (node_modules/globby/index.js:133:40)
  at scanComponents (node_modules/@nuxt/components/dist/index.js:51:25)

   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                                  โ”‚
   โ”‚   โœ– Nuxt Fatal Error                             โ”‚
   โ”‚                                                  โ”‚
   โ”‚   TypeError: micromatch.scan is not a function   โ”‚
   โ”‚                                                  โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

npm ERR! code 1
npm ERR! path /home/alex/projects/www/openatlas_discovery
npm ERR! command failed
npm ERR! command sh -c nuxt-ts generate

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alex/.npm/_logs/2022-03-15T14_19_25_343Z-debug.log

Actions #3

Updated by Alexander Watzinger about 2 years ago

  • Description updated (diff)
Actions #4

Updated by Alexander Watzinger about 2 years ago

Here the output of npm ls in the project root folder:

alex@morpheus:~/projects/www/openatlas_discovery[feature_view_1]$ npm ls
openatlas_discovery@0.0.1 /home/alex/projects/www/openatlas_discovery
โ”œโ”€โ”€ @elfalem/leaflet-curve@0.9.1
โ”œโ”€โ”€ @mdi/font@5.9.55
โ”œโ”€โ”€ @nuxt/content@1.15.1
โ”œโ”€โ”€ @nuxt/types@2.15.8
โ”œโ”€โ”€ @nuxt/typescript-build@1.0.3
โ”œโ”€โ”€ @nuxt/typescript-runtime@0.4.10
โ”œโ”€โ”€ @nuxtjs/axios@5.13.6
โ”œโ”€โ”€ @nuxtjs/eslint-config-typescript@2.0.0
โ”œโ”€โ”€ @nuxtjs/eslint-config@3.1.0
โ”œโ”€โ”€ @nuxtjs/eslint-module@2.0.0
โ”œโ”€โ”€ @nuxtjs/netlify-files@1.2.0
โ”œโ”€โ”€ @nuxtjs/vuetify@1.12.3
โ”œโ”€โ”€ @types/leaflet@1.7.9
โ”œโ”€โ”€ babel-eslint@10.1.0
โ”œโ”€โ”€ d3-tip@0.9.1
โ”œโ”€โ”€ d3@6.7.0
โ”œโ”€โ”€ eslint-config-airbnb@18.2.1
โ”œโ”€โ”€ eslint-plugin-jsx-a11y@6.5.1
โ”œโ”€โ”€ eslint-plugin-nuxt@1.0.0
โ”œโ”€โ”€ eslint-plugin-react@7.29.3
โ”œโ”€โ”€ eslint@7.32.0
โ”œโ”€โ”€ leaflet-textpath@1.2.3
โ”œโ”€โ”€ leaflet@1.7.1
โ”œโ”€โ”€ nuxt-leaflet@0.0.27
โ”œโ”€โ”€ nuxt@2.15.8
โ”œโ”€โ”€ swagger-client@3.18.4
โ”œโ”€โ”€ typeface-roboto@1.1.13
โ”œโ”€โ”€ vue-histogram-slider@0.3.8
โ”œโ”€โ”€ vue-json-viewer@2.2.22
โ””โ”€โ”€ vuetify@2.6.4

Actions #5

Updated by Alexander Watzinger about 2 years ago

  • Status changed from Assigned to Closed

We could solve this with deleting the /node_modules directory and rebuild node packages again.

Actions

Also available in: Atom PDF