Project

General

Profile

Actions

Bug #16599

closed

"SyntaxError: Unexpected identifier" webpack build error in svgo package

Added by Dominic Cleal over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Packaging
Target version:

Description

test_develop and PR builds are failing to run on NodeJS 0.10.46 (on Jenkins) with the following error:

/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/.bin/webpack --config /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/config/webpack.config.js --bail
The Apipie cache is turned off. Enable it and run apipie:cache rake task to speed up API calls.

/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/plugins/cleanupIDs.js:123
    for (var ID of referencesIDs) {
                ^^
ModuleBuildError: Module build failed: ModuleBuildError: Module build failed: SyntaxError: Unexpected identifier
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/lib/svgo/config.js:99:33
    at Array.map (native)
    at preparePluginsArray (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/lib/svgo/config.js:64:20)
    at module.exports (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/lib/svgo/config.js:32:28)
    at new module.exports (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/node_modules/svgo/lib/svgo.js:21:19)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/node_modules/postcss-svgo/dist/index.js:91:16
    at Object.creator [as postcssSvgo] (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/postcss/lib/postcss.js:150:35)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/dist/index.js:276:40
    at Array.forEach (native)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/cssnano/dist/index.js:263:29
    at creator (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/node_modules/postcss/lib/postcss.js:150:35)
    at processCss (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/lib/processCss.js:185:16)
    at Object.module.exports (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/css-loader/lib/loader.js:24:2)
    at DependenciesBlock.onModuleBuildFailed (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at runSyncOrAsync (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4)
    at nextLoader (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:78:16
    at fs.js:272:14
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:43:10
    at Object.oncomplete (fs.js:108:15)
    at DependenciesBlock.onModuleBuildFailed (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at DependenciesBlock.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:228:39)
    at context.callback (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at Object.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/extract-text-webpack-plugin/loader.js:82:20)
    at Compiler.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compiler.js:204:18)
    at Compiler.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compiler.js:395:18)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/tapable/lib/Tapable.js:99:11
    at Compilation.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:433:11)
    at errorAndCallback (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:340:3)
    at Compilation.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:400:12)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:123:4
    at Array.forEach (native)
    at callback (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:122:12)
    at Compilation.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/Compilation.js:137:11)
    at DependenciesBlock.<anonymous> (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/lib/NormalModule.js:85:18)
    at DependenciesBlock.onModuleBuildFailed (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:10)
    at nextLoader (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at runSyncOrAsync (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4)
    at nextLoader (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:78:16
    at fs.js:272:14
    at /var/lib/workspace/workspace/test_develop/database/postgresql/ruby/2.3/slave/fast/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:43:10
    at Object.oncomplete (fs.js:108:15)
rm -rf jenkins/reports/unit/
WARNING: `rake webpack:compile` failed to run. This is only important if running integration tests. (cause: Command failed with status (1): [/var/lib/workspace/workspace/test_develop/...])
Actions #1

Updated by Dominic Cleal over 7 years ago

The svgo package's engine dependency was increased to >= 0.12.0 when adding this ES2015 syntax, so it's likely that Foreman's min engine version should match or it needs pinning. This is not the only module however that claims incompatibility with 0.10.0:

npm WARN engine eslint@3.5.0: wanted: {"node":">=4"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine jest-cli@15.1.1: wanted: {"node":">= 4"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine postcss@5.2.0: wanted: {"node":">=0.12"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine callsites@2.0.0: wanted: {"node":">=4"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine svgo@0.7.0: wanted: {"node":">=0.12.0"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine vendors@1.0.1: wanted: {"node":">=0.11.0"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine escodegen@1.8.1: wanted: {"node":">=0.12.0"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine escodegen@1.8.1: wanted: {"node":">=0.12.0"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine strip-bom@3.0.0: wanted: {"node":">=4"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine form-data@2.0.0: wanted: {"node":">= 0.12"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine http-signature@1.1.1: wanted: {"node":">=0.8","npm":">=1.3.7"} (current: {"node":"v0.10.46","npm":"1.3.6"})
npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"v0.10.46","npm":"1.3.6"})
Actions #2

Updated by Ketan Ghotekar over 7 years ago

Dominic Cleal wrote:

The svgo package's engine dependency was increased to >= 0.12.0 when adding this ES2015 syntax, so it's likely that Foreman's min engine version should match or it needs pinning. This is not the only module however that claims incompatibility with 0.10.0:

[...]

Can you please tell me how this issue was resolved. Did you update any packages? I am facing the exact same issue. Please help.

Actions #3

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/3861 added
Actions #4

Updated by Daniel Lobato Garcia over 7 years ago

  • Target version set to 1.5.2
Actions #5

Updated by The Foreman Bot over 7 years ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/1355 added
Actions #6

Updated by Anonymous over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by The Foreman Bot over 7 years ago

  • Pull request https://github.com/theforeman/foreman/pull/3885 added
Actions

Also available in: Atom PDF