An issue with node_modules/google-closure-compiler when building
alkavan opened this issue · comments
I have an issue when executing build
:
With JAVA:
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (build 1.8.0_144-b01)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
Scene imported from external module 'three' but never used
created build/physics-module.native.js, build/physics-module.native.module.js in 15.2s
> physics-module-ammonext@0.1.2 minify /home/wdna/Develop/Games/physics-module-ammonext
> java -jar node_modules/google-closure-compiler/compiler.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --language_in=ECMASCRIPT6_STRICT --externs tools/build/externs.js --js build/physics-module.js --js_output_file build/physics-module.min.js
ERROR - Cannot read file tools/build/externs.js: {1}
1 error(s), 0 warning(s)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! physics-module-ammonext@0.1.2 minify: `java -jar node_modules/google-closure-compiler/compiler.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --language_in=ECMASCRIPT6_STRICT --externs tools/build/externs.js --js build/physics-module.js --js_output_file build/physics-module.min.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the physics-module-ammonext@0.1.2 minify script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
...
I'm actually trying to fix an issue with (I assume):
import PhysicsWorker from 'worker!../worker.js';
Cause:
ERROR in ./node_modules/physics-module-ammonext/src/modules/WorldModule.js
Module not found: Error: Can't resolve 'worker' in '/home/wdna/Develop/Games/ste/node_modules/physics-module-ammonext/src/modules'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'worker-loader' instead of 'worker',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
@ ./node_modules/physics-module-ammonext/src/modules/WorldModule.js 5:0-48
@ ./node_modules/physics-module-ammonext/src/modules/index.js
@ ./app/main.js
In main application.
Hey, @alkavan, it looks like with recent refactoring I accidentally removed tools
folder which is needed by google closure compiler.
You could take it from any of my previous commits or use builds without minifying.
For development I advise you to use npm start
command