remotestorage / remotestorage.js

⬡ JavaScript client library for integrating remoteStorage in apps
https://remotestoragejs.readthedocs.io
MIT License
2.31k stars 141 forks source link

During build: Error: Cannot find module 'requirejs' #67

Closed aykevl closed 12 years ago

aykevl commented 12 years ago

Building with node.js fails (with latest master branch).

Node version: v0.6.12 Ubuntu version: 12.04 (with all updates applied)

Error message: (...)/remoteStorage.js/build$ node build.js

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'requirejs' at Function._resolveFilename (module.js:332:11) at Function._load (module.js:279:25) at Module.require (module.js:354:17) at require (module.js:370:17) at Object. (/home/ayke/projects/remoteStorage.js/build/build.js:2:15) at Module._compile (module.js:441:26) at Object..js (module.js:459:10) at Module.load (module.js:348:32) at Function._load (module.js:308:12) at Array.0 (module.js:479:10)

nilclass commented 12 years ago

You need to install requirejs via npm:

npm install requirejs

aykevl commented 12 years ago

Ok. That solved the issue (when first installng npm). Thanks.

aykevl commented 12 years ago

But the build changes the files. I haven't changed the source js files. The files seem to be more optimized (from 54K to 44K). Is this OK? When I commit some changes in the js files, do I need to commit those changes in the build/ directory?

Is this the right place to ask such questions?

untitaker commented 12 years ago

@aykevl93 See https://github.com/unhosted/ToS-DR/issues/33 for more information on unhosted's repo structure. It's ok, yes.

nilclass commented 12 years ago

It is possible that the compiled files differ, even though the source didn't change due to differences in the installed version of requirejs. I wouldn't worry about that. Also sometimes it happens that the person who committed the built files had some changes in the local tree that weren't committed yet, but taken into the build. This shouldn't happen normally, but naturally it does :)

In general all code changes should happen under src/, then be committed together with the build.

aykevl commented 12 years ago

Ok. So, I have now added my first code change as a pull request to remoteStorage.js (including new build that produces more optimized javascript): https://github.com/unhosted/remoteStorage.js/pull/68