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.

UglifyJS error during gulp bundle --ship

See original GitHub issue

One of our projects use the library for querying against sharepoint lists. The project runs ok on dev, but generates a build error once we try to build for production.

steps to reproduce:

  1. create new ms spfx project using yoeman generator (webpart, o365 only)
  2. npm install linqts --save
  3. use library in code
import { List } from 'linqts';
export default class SampleFabric extends React.Component<ISampleFabricProps, {}> {
  public render(): React.ReactElement<ISampleFabricProps> {
    
    let dataList = new List(["a", "b"]);
    ...
}
  1. gulp bundle --ship

returns this error:

Error - [webpack] 'dist':
sample-fabric-web-part.js from UglifyJs
Unexpected token: operator (>) [sample-fabric-web-part.js:738,10]

reverting to v1.10.0 (npm install --save-exact linqts@1.10.0) will allow the build to complete.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
kutyelcommented, Mar 9, 2018

Tomorrow I’ll release a new version reestablishing the dist version to es5, should fix this issue and @huserben’s one as well! 😄

1reaction
haifoocommented, Mar 13, 2018

thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error - [webpack] 'dist': web-part.js from UglifyJs Unexpected ...
run gulp bundle --ship and gulp package-solution --ship to package the webpart ... The build always fails at step 3 with following error....
Read more >
Correcting SPFx gulp –ship Uglify Errors: Unexpected token
We came across the following problem when trying to execute a gulp --ship on out SPFx development [15:03:34] Starting subtask 'webpack'.
Read more >
Dealing with package errors when building SharePoint ...
When I ran gulp --ship to prepare the bundle I got the following error: ... Something broke when the build process was running...
Read more >
"[webpack] 'dist': web-part.js from UglifyJs Unexpected token ...
When we started with the deployment process and while running the "gulp bundle --ship" command, it throws an error message as "[webpack] ...
Read more >
webpack -p error: ERROR in bundle.js from UglifyJs
The problem is that UglifyjsWebpackPlugin doesn't support minification of ES6 code. You should add babel loader or change uglify-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