Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid options object | Terser Plugin Error #1370

Closed
BernhardRode opened this issue Jul 12, 2021 · 3 comments · Fixed by #1391
Closed

Invalid options object | Terser Plugin Error #1370

BernhardRode opened this issue Jul 12, 2021 · 3 comments · Fixed by #1391
Assignees
Labels
P0 Critical issues. (t) Bug Bug reports (actual behavior is different than the expected behavior).

Comments

@BernhardRode
Copy link
Contributor

Every bug report should have precise description and reproduction steps; console traces or source code references are appreciated.

For assistance requests, contact Azure support or submit a post on Stack Overflow. We don't provide support through GitHub Issues. Feature requests can be raised on the Azure Feedback Forum.

Bug description

A clear and concise description of the bug.

Reproduction steps

  1. Checkout repository
  2. Checkout tag 2.10.0
  3. Add correct files config.design.json, config.publish.json, config.runtime.json, config.validate.json
  4. Run npm install
  5. Run npm run build

Expected behavior

A build should be created.

Is your portal managed or self-hosted?

Self-hosted

Release tag or commit SHA (if using self-hosted version)

2.10.0 and master branch

API Management service name

apim-d-c20683868b2f18a00

Environment

  • OS X

Additional context

Same happens,

➜  api-management-developer-portal-github git:(heads/2.10.0) ✗ npm run build

> apim-developer-portal@2.0.0 build /Users/rbo2abt/Development/api-management-developer-portal-github
> webpack --config webpack.build.js

Invalid options object. Terser Plugin has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'sourceMap'. These properties are valid:
   object { test?, include?, exclude?, parallel?, minify?, terserOptions?, extractComments? }
ValidationError: Invalid options object. Terser Plugin has been initialized using an options object that does not match the API schema.
    at validate (/Users/rbo2abt/Development/api-management-developer-portal-github/node_modules/schema-utils/dist/validate.js:104:11)
    at new TerserPlugin (/Users/rbo2abt/Development/api-management-developer-portal-github/node_modules/terser-webpack-plugin/dist/index.js:32:31)
    at Object.<anonymous> (/Users/rbo2abt/Development/api-management-developer-portal-github/webpack.build.js:11:13)
    at Module._compile (/Users/rbo2abt/Development/api-management-developer-portal-github/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (/Users/rbo2abt/Development/api-management-developer-portal-github/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! apim-developer-portal@2.0.0 build: `webpack --config webpack.build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the apim-developer-portal@2.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rbo2abt/.npm/_logs/2021-07-12T08_03_08_660Z-debug.log
➜  api-management-developer-portal-github git:(heads/2.10.0) ✗
@ghost
Copy link

ghost commented Jul 12, 2021

@BernhardRode, thank you for opening this issue. We will triage it within the next few business days.

@azaslonov
Copy link
Member

Indeed! I wonder why it didn't complain before. I'll fix this.

@azaslonov azaslonov self-assigned this Jul 13, 2021
@azaslonov azaslonov added (t) Bug Bug reports (actual behavior is different than the expected behavior). P0 Critical issues. labels Jul 13, 2021
@ghost
Copy link

ghost commented Jul 13, 2021

@BernhardRode, thank you for reporting the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Critical issues. (t) Bug Bug reports (actual behavior is different than the expected behavior).
Projects
None yet
2 participants