closure-util
closure-util copied to clipboard
closure-util blocks npm install of openlayers on Windows: ERPROTO
Unable to install openlayers on windows due to error. Works fine with node 5 and npm 3.4 on OSX
[email protected] postinstall C:\Users\E027694\Projects\ARMadillo\ArcGISExample\ArcGISExample\node_modules\closure-util node ./bin/closure-util.js update
info install Downloading https://github.com/google/closure-library/archive/5b25e65.zip info install Downloading http://dl.google.com/closure-compiler/compiler-20151015.zip ERR! closure-util write EPROTO npm WARN EPACKAGEJSON [email protected] No repository field. npm WARN EPACKAGEJSON [email protected] No license field. npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\E027694\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "closure -util" npm ERR! node v5.0.0 npm ERR! npm v3.4.1 npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node ./bin/closure-util.js update
npm ERR! Exit status 1
npm ERR!
Same error for me. I am working on windows behind a corporate proxy.
npm ERR! [email protected] postinstall: 'node ./bin/closure-util.js update' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node ./bin/closure-util.js update' npm ERR! Make sure you have the latest version of node.js and npm installed.
Bump, I have the same issue:
info install Downloading http://dl.google.com/closure-compiler/compiler-20160619.zip info install Downloading https://github.com/google/closure-library/archive/v20160619.zip info install Download complete: J:\UDC-BUILDBOT\002\002\build\Frontend\src\UDC-TS\app\Assets-TS\node_modules\closure-util.deps\compiler\e9db3081300ea6a27d1b6926d843182038111076 info install Download complete: J:\UDC-BUILDBOT\002\002\build\Frontend\src\UDC-TS\app\Assets-TS\node_modules\closure-util.deps\library\87f29481f1e57fbba986e2304ac80d4173f94c9c
[email protected] postinstall J:\UDC-BUILDBOT\002\002\build\Frontend\src\UDC-TS\app\Assets-TS\node_modules\openlayers closure-util update
'closure-util' is not recognized as an internal or external command, operable program or batch file.
A work-around for now is:
npm i -g closure-util
This is a bug also on Linux. The proper fix would be to have openlayers depend on closure-util and then call the one in there.
Same problem. Windows. Running cmd
as Administrator
.
02221224710
is my username of my corporate proxy.
32814 warn Error: EPERM: operation not permitted, lstat 'C:\Users\contmagno\AppData\Roaming\npm\node_modules\closure-util\node_modules\debug\node_modules'
32814 warn at Error (native)
32814 warn { Error: EPERM: operation not permitted, lstat 'C:\Users\contmagno\AppData\Roaming\npm\node_modules\closure-util\node_modules\debug\node_modules'
32814 warn at Error (native)
32814 warn errno: -4048,
32814 warn code: 'EPERM',
32814 warn syscall: 'lstat',
32814 warn path: 'C:\\Users\\contmagno\\AppData\\Roaming\\npm\\node_modules\\closure-util\\node_modules\\debug\\node_modules' }
32815 verbose Please try running this command again as root/Administrator.
32816 verbose stack Error: [email protected] postinstall: `node ./bin/closure-util.js update`
32816 verbose stack Exit status 1
32816 verbose stack at EventEmitter.<anonymous> (C:\Users\contmagno\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
32816 verbose stack at emitTwo (events.js:106:13)
32816 verbose stack at EventEmitter.emit (events.js:191:7)
32816 verbose stack at ChildProcess.<anonymous> (C:\Users\contmagno\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
32816 verbose stack at emitTwo (events.js:106:13)
32816 verbose stack at ChildProcess.emit (events.js:191:7)
32816 verbose stack at maybeClose (internal/child_process.js:877:16)
32816 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
32817 verbose pkgid [email protected]
32818 verbose cwd C:\esm\OpenLayers\modify-circle-tests
32819 error Windows_NT 6.1.7601
32820 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\contmagno\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "closure-util"
32821 error node v6.9.5
32822 error npm v4.1.2
32823 error code ELIFECYCLE
32824 error [email protected] postinstall: `node ./bin/closure-util.js update`
32824 error Exit status 1
32825 error Failed at the [email protected] postinstall script 'node ./bin/closure-util.js update'.
32825 error Make sure you have the latest version of node.js and npm installed.
32825 error If you do, this is most likely a problem with the closure-util package,
32825 error not with npm itself.
32825 error Tell the author that this fails on your system:
32825 error node ./bin/closure-util.js update
32825 error You can get information on how to open an issue for this project with:
32825 error npm bugs closure-util
32825 error Or if that isn't available, you can get their info via:
32825 error npm owner ls closure-util
32825 error There is likely additional logging output above.
32826 verbose exit [ 1, true ]
@icemagno
This looks like it is trying to use the local version. Maybe there was a problem with this local version of closure-util.
Maybe try the latest version of openlayers and my work-around.
It is a fresh master checkout of OL. I'm a realy newbie on this. Can you be more detailed?
@icemagno I think you have a different issue and with your proxy settings. How did you configure your proxy for npm? Fresh master checkout? Are you using OpenLayers or developing for it? If you are just using it, you should not use the master branch as it may not be stable. Use a stable version.
Yep I think you're right about the proxy....Ive set it in enviroment and using npm config. The proxy is ok because I can see some packages being downloaded. I forgot to set it at my first try and have a different error. But....Geoserver is having some trouble to use my proxy too so....it is a military proxy and have some tricks I don't know. About the master..... I just take a bleeding edge master in a fork and create a branch to help the OL guys in a piece of code. Intent to create a pull request later but I can't help without setting the dev environment.
I'm having (pretty much) the same problem on linux.
error /www/node_modules/closure-util: Command failed.
Exit code: 1
Command: sh
Arguments: -c node ./bin/closure-util.js update
Directory: /www/node_modules/closure-util
Output:
info install Downloading http://dl.google.com/closure-compiler/compiler-20160619.zip
info install Downloading https://github.com/google/closure-library/archive/v20160619.zip
info install Download complete: /www/node_modules/closure-util/.deps/compiler/e9db3081300ea6a27d1b6926d843182038111076
ERR! install Error: ENOTEMPTY: directory not empty, rmdir '/www/node_modules/closure-util/.deps/library/87f29481f1e57fbba986e2304ac80d4173f94c9c/closure-library-20160619/closure/goog/i18n'
ERR! install at Error (native)
ERR! install { Error: ENOTEMPTY: directory not empty, rmdir '/www/node_modules/closure-util/.deps/library/87f29481f1e57fbba986e2304ac80d4173f94c9c/closure-library-20160619/closure/goog/i18n'
ERR! install at Error (native)
ERR! install errno: -39,
ERR! install code: 'ENOTEMPTY',
ERR! install syscall: 'rmdir',
ERR! install path: '/www/node_modules/closure-util/.deps/library/87f29481f1e57fbba986e2304ac80d4173f94c9c/closure-library-20160619/closure/goog/i18n' }
ERR! closure-util EPERM: operation not permitted, open '/www/node_modules/closure-util/.deps/library/87f29481f1e57fbba986e2304ac80d4173f94c9c/closure-library-20160619/closure/goog/ui/filterobservingmenuitem.js'
@geekdenz: I tried to install closure-util
globally as suggested, but it didn't work.
@icemagno & @knedlsepp Can you try
npm i
in the folder?
If that doesn't work:
npm i --save closure-util
add dependencies "closure-util": "github:fengdehong/closure-util"
I also have this problem trying to build angular-cli project (includes open layers)
[email protected] postinstall /home/rof/src/github.com/comp/proj/node_modules/closure-util node ./bin/closure-util.js update
/home/rof/src/github.com/comp/proj/node_modules/lodash/lodash.js:424
});
^
SyntaxError: Unexpected token }
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.
npm ERR! [email protected] postinstall: node ./bin/closure-util.js update
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node ./bin/closure-util.js update'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the closure-util package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/closure-util.js update
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs closure-util
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls closure-util
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/rof/.npm/_logs/2017-05-04T13_02_38_641Z-debug.log
I am still having this problem, installing globally feels like a hack, can openlayers not simply add as a dependancy ???
Not sure what your build environment looks like. But if you're not relying on the Closure Compiler, you should consider using the ol package instead of the openlayers one. That switch will allow you to use mainstream bundlers and minifiers in a hassle free way.
We ran into the same issue on a windows machine. The solution was to set http_proxy and https_proxy explicitly in the windows environment variables. Using the npm config was not enough.
@ahocevar Solved my problem, thank you.