Basic Install Issue

46 views
Skip to first unread message

Danny Goodman

unread,
Aug 16, 2021, 1:41:44 PM8/16/21
to Closure Library Discuss
Closure newbie here, having problems with basic installation. nom install won't complete. Full transcript follows (username replaced with  'xxxx')::

bash-3.2$ cd closure-library
bash-3.2$ ls
AUTHORS README.md closure package.json sauce_browsers.json
CONTRIBUTING alltests.html closure-deps protractor.conf.js scripts
LICENSE browser_capabilities.js doc protractor_spec.js third_party
bash-3.2$ npm install
npm ERR! Error: Attempt to unlock google-closure-deps@file:./closure-deps/, which hasn't been locked
npm ERR!     at unlock (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR!     at OpenReq.Req.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR!     at OpenReq.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR! System Darwin 19.6.0
npm ERR! command "node" "/Users/xxxxx/.nvm/v0.10.12/bin/npm" "install"
npm ERR! cwd /Users/xxxxx/Closure/closure-library
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.4.13
npm ERR! Error: Attempt to unlock http-server@^0.12.3, which hasn't been locked
npm ERR!     at unlock (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR!     at OpenReq.Req.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR!     at OpenReq.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR! System Darwin 19.6.0
npm ERR! command "node" "/Users/xxxxx/.nvm/v0.10.12/bin/npm" "install"
npm ERR! cwd /Users/xxxxx/Closure/closure-library
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.4.13
npm ERR! Error: Attempt to unlock parse5@^6.0.1, which hasn't been locked
npm ERR!     at unlock (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR!     at OpenReq.Req.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR!     at OpenReq.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR! System Darwin 19.6.0
npm ERR! command "node" "/Users/xxxxx/.nvm/v0.10.12/bin/npm" "install"
npm ERR! cwd /Users/xxxxx/Closure/closure-library
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.4.13
npm ERR! Error: Attempt to unlock promises-aplus-tests@^2.1.2, which hasn't been locked
npm ERR!     at unlock (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR!     at OpenReq.Req.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR!     at OpenReq.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR! System Darwin 19.6.0
npm ERR! command "node" "/Users/xxxxx/.nvm/v0.10.12/bin/npm" "install"
npm ERR! cwd /Users/xxxxx/Closure/closure-library
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.4.13
npm ERR! Error: Attempt to unlock protractor@^7.0.0, which hasn't been locked
npm ERR!     at unlock (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at /Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR!     at OpenReq.Req.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR!     at OpenReq.done (/Users/xxxxx/.nvm/v0.10.12/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:

npm ERR! System Darwin 19.6.0
npm ERR! command "node" "/Users/xxxxx/.nvm/v0.10.12/bin/npm" "install"
npm ERR! cwd /Users/xxxxx/Closure/closure-library
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.4.13
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/xxxxx/Closure/closure-library/npm-debug.log
npm ERR! not ok code 0
bash-3.2$ 

Stephen Hicks

unread,
Aug 17, 2021, 1:56:42 PM8/17/21
to Closure Library Discuss
I don't know for sure what's up here, but you're using a very old version of Node (0.10) which was EOL'd nearly 5 years ago.  The first thing I'd try would be to download nvm (https://github.com/nvm-sh/nvm) and install Node 16 (along with a modern npm - mine is 7.5 FWIW, compared to your 1.4).

That said, if you're a new user it's not clear you really even need to `npm install` in the Closure directory - that doesn't actually "install" it on your system that way (say) a package manager (like brew or apt) does.  NPM generally works by installing libraries into a local `node_modules` directory for each project.  So probably what you want to do instead is, in your project's directory, `npm init`, followed by `npm install google-closure-library`.  Then you can find the Closure sources in the `node_modules/google-closure-library` directory to reference from your own sources.

Danny Goodman

unread,
Aug 18, 2021, 8:03:22 PM8/18/21
to Closure Library Discuss
Thank you Stephen. I thought I had previously updated Node et al. in homebrew, but I suspect some ancient stuff from an old IoT project I worked on gummed up the works and wouldn't allow updates. (I obviously don't use Node elsewhere on a regular basis.) I purged my system of Node and reinstalled the current versions via nvm. Hoist the mainsail!

Apologies to the group for wasting bandwidth on such a rookie problem.

Reply all
Reply to author
Forward
0 new messages