aframe icon indicating copy to clipboard operation
aframe copied to clipboard

npm run dist error

Open dtboy1995 opened this issue 3 years ago • 3 comments

Description: npm run dist error

  • A-Frame Version: latest (master branch)
  • Platform / Device: Windows 10
PS C:\Users\lili\Downloads\aframe-master> npm run dist

> [email protected] dist C:\Users\lili\Downloads\aframe-master
> node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max


> [email protected] dist:min C:\Users\lili\Downloads\aframe-master
> npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map 
] -o dist/aframe-master.min.js

uglify-js failed on src/components/hand-tracking-controls.js : SyntaxError: Unexpected token name «of», expected punc «;»
uglify-js failed on src/components/layer.js : SyntaxError: Unexpected token: name (x1offset)
uglify-js failed on src/utils/ios-orientationchange-blank-bug.js : SyntaxError: Unexpected character '`'
uglify-js failed on node_modules/super-three/build/three.js : SyntaxError: Unexpected token: name (EventDispatcher)     
uglify-js failed on node_modules/three-bmfont-text/index.js : SyntaxError: Unexpected token: name (TextGeometry)        
uglify-js failed on node_modules/super-three/examples/js/lights/LightProbeGenerator.js : SyntaxError: Unexpected token: 
name (LightProbeGenerator)
uglify-js failed on node_modules/super-three/examples/js/loaders/OBJLoader.js : SyntaxError: Unexpected token name «mi», expected punc «;»
uglify-js failed on node_modules/super-three/examples/js/loaders/MTLLoader.js : SyntaxError: Unexpected token: name (MTLLoader)
uglify-js failed on node_modules/super-three/examples/js/utils/BufferGeometryUtils.js : SyntaxError: Unexpected token operator «=», expected punc «,»
uglify-js failed on node_modules/super-three/examples/js/loaders/DRACOLoader.js : SyntaxError: Unexpected token: name (DRACOLoader)
uglify-js failed on node_modules/super-three/examples/js/loaders/GLTFLoader.js : SyntaxError: Unexpected token: name (GLTFLoader)

> [email protected] dist:max C:\Users\lili\Downloads\aframe-master
> npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js

dtboy1995 avatar Jan 27 '22 14:01 dtboy1995

That’s fine. Builds should still generate. Do they?

dmarcos avatar Jan 27 '22 18:01 dmarcos

I think your builds are not generated because of some syntax error in your code You can see the first line in the error message reports a Syntax Error

Yash-Punia avatar Mar 01 '22 18:03 Yash-Punia

The build was actually fine, it just didn't minified the files that used some ES6 syntax. #5111 is changing the minifier to terser to fix those errors.

vincentfretin avatar Sep 10 '22 16:09 vincentfretin

@vincentfretin introduced webpack. Is this still an issue?

dmarcos avatar Nov 19 '22 03:11 dmarcos

Not an issue anymore with terser. You can close.

vincentfretin avatar Nov 19 '22 16:11 vincentfretin