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.

Error on npm run production on shapecss

See original GitHub issue

I am have error on npm run production, and its killing me 😦

/js/shapecss.js from UglifyJs Unexpected token: name (Accordion) [./~/shapecss/resources/assets/js/component/Accordion.js:1,0][/js/shapecss.js:19054,6]

I am using shapecss developed in laravel mix.

here is code is look like,

'use strict';

import {Accordion} from "./component/Accordion";
import {Modal} from "./component/Modal";
import {getTab} from "./component/Tab";
import {Nav} from "./component/Nav";
import {Circle} from "./component/shapes/Circle";
import {Parallelogram} from "./component/shapes/Parallelogram";
import {Rectangle} from "./component/shapes/Rectangle";
import {Square} from "./component/shapes/Square";


window.onload = function () {
  new Accordion();
  new Modal();
  getTab();
  new Nav();
  new Circle();
  new Parallelogram();
  new Rectangle();
  new Square();
}

Accordion class is look like,

export class Accordion{
        constructor(){
            this.accordionDivs = document.getElementsByClassName('accordion');
            if(this.accordionDivs)
            this.processAccordions();
        }
processAccordions() {
...
}

for detail please check,

Accordion class

and entry file,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
TheLarkInncommented, Jun 20, 2017

This is not working be ause the es6 version of uglify has not landed yet, you will need to transpiled the js used to es5 before uglify can support it

1reaction
JeffreyWaycommented, Jun 20, 2017

Mix’s webpack config file doesn’t run Babel on any files in your node_modules directory, so that’s likely the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on npm run production on shapecss · Issue #878 - GitHub
I am have error on npm run production, and its killing me :( /js/shapecss.js from UglifyJs Unexpected token: name (Accordion) [.
Read more >
POSTCSS - NPM Error Running NPM RUN PRODUCTION
I'm getting the following error anytime I try to run 'npm run production'. The rest of the error is just a list of...
Read more >
npm-audit
Run all build scripts (ie, preinstall , install , and postinstall ) scripts for installed packages in the foreground process, sharing standard input,...
Read more >
npm run dev is showing error on existing Laravel Project
npm run dev is showing error on existing Laravel Project ... Then I run npm install to install all dependencies and update all...
Read more >
superset build failures - npm run build - Google Groups
npm run build # this step errors out. Error: + 2221 hidden modules ... 0.18.0-alpha.3~build: Args: [ '-c', 'NODE_ENV=production webpack --colors --progress' ]....
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