Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue on Ubuntu #2

Closed
nirajbhatt7 opened this issue Sep 25, 2017 · 6 comments
Closed

Build Issue on Ubuntu #2

nirajbhatt7 opened this issue Sep 25, 2017 · 6 comments
Assignees

Comments

@nirajbhatt7
Copy link

nirajbhatt7 commented Sep 25, 2017

Let me know if I am missing anything.

nirajbhatt7@LinuxDev:/Test1$ npm --version
3.5.2
nirajbhatt7@LinuxDev:/Test1$ node --version
v4.7.2
nirajbhatt7@LinuxDev:/Test1$ python --version
Python 2.7.13
nirajbhatt7@LinuxDev:/Test1$ go version
go version go1.9 linux/amd64
nirajbhatt7@LinuxDev:/Test1$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
nirajbhatt7@LinuxDev:/Test1$ go generate -v github.com/aclindsa/moneygo
src/github.com/aclindsa/moneygo/accounts.go
src/github.com/aclindsa/moneygo/accounts_lua.go
src/github.com/aclindsa/moneygo/balance_lua.go
src/github.com/aclindsa/moneygo/date_lua.go
src/github.com/aclindsa/moneygo/db.go
src/github.com/aclindsa/moneygo/errors.go
src/github.com/aclindsa/moneygo/gnucash.go
src/github.com/aclindsa/moneygo/imports.go
src/github.com/aclindsa/moneygo/main.go
browserify -t [ babelify --presets [ react es2015 ] ] js/main.js -o static/bundle.js
Error: Cannot find module 'cldr-data/supplemental/likelySubtags' from '/home/nirajbhatt7/Test1/src/github.com/aclindsa/moneygo/js'
at /usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
at process (/usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
at ondir (/usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
at load (/usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
at /usr/local/lib/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
Makefile:9: recipe for target 'static/bundle.js' failed
make: *** [static/bundle.js] Error 1
src/github.com/aclindsa/moneygo/main.go:3: running "make": exit status 2
nirajbhatt7@LinuxDev:~/Test1$

@aclindsa
Copy link
Owner

This looks like something that likely has to do with the difference between local and global installations of npm packages. I don't have an Ubuntu 17.04 box handy to test with, but I may see if I can get a VM up and running if I get a chance.

Have you installed npm previously on this Ubuntu install, or is it 'fresh' from that perspective?

@aclindsa
Copy link
Owner

I don't know that I have an explicit version dependency, but your npm/node versions are somewhat older than mine (I'm at 5.3.0/v8.5.0). What is your 'browserify' version:

% browserify --version
14.4.0

@nirajbhatt7
Copy link
Author

nirajbhatt7 commented Sep 25, 2017

browserify is the same 14.4.0

This is a brand new VM on Azure that I just created and installed everything fresh

Maybe if you do not find anything then probably I will try to install all the latest versions manually

@aclindsa
Copy link
Owner

I got a different, but likely related, error when I tried to do this on Ubuntu 17.04 (on a fresh Vagrant image):

49020 verbose stack Error: cldr-data@31.0.2 install: `node install.js`
49020 verbose stack spawn ENOENT
49020 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:17:16)
49020 verbose stack     at emitTwo (events.js:87:13)
49020 verbose stack     at ChildProcess.emit (events.js:172:7)
49020 verbose stack     at maybeClose (internal/child_process.js:854:16)
49020 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
49021 verbose pkgid cldr-data@31.0.2
[snip]
49032 error Failed at the cldr-data@31.0.2 install script 'node install.js'.
49032 error Make sure you have the latest version of node.js and npm installed.
49032 error If you do, this is most likely a problem with the cldr-data package,
49032 error not with npm itself.

Following the error message's advice, I installed node 8.5.0 by running https://deb.nodesource.com/setup_8.x (linked to from https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server), ran sudo apt-get install nodejs, and was then able to build moneygo successfully.

This may not have been necessary, but I removed the $GOPATH/src/github.com/aclindsa/moneygo/node_modules directory before re-trying the go generate ... command.

Let me know if upgrading nodejs resolves this issue for you as well. If it does, I'll update the documentation to reflect that moneygo depends upon a certain version of nodejs.

@aclindsa aclindsa self-assigned this Sep 25, 2017
@nirajbhatt7
Copy link
Author

That worked. I had to do both. Upgrade node and remove node_modules. I have a working site. Will look around. Thanks

aclindsa added a commit that referenced this issue Sep 27, 2017
This is to address #2, where the older npm/nodejs versions on Ubuntu causes errors when installing cldr-data.
@aclindsa
Copy link
Owner

@nirajbhatt7 FYI, I went back and tested this with nodejs versions 7.10.1, 6.11.3, and 4.8.4. Of those, only 4.8.4 failed. It looks like the issue was fixed somewhere before 6.11.3 and that you don't have to be on the absolute latest versions. I updated the README to reflect this version dependency.

newheaven918 added a commit to newheaven918/moneygo that referenced this issue Feb 29, 2024
This is to address aclindsa/moneygo#2, where the older npm/nodejs versions on Ubuntu causes errors when installing cldr-data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants