I am following Ampersand.js's Quick Start Guide and having trouble get the script to compile 'out of box'.
I generated a fresh app per its instruction guide (using ampersand command) and attempt to compile the scaffold codes with browserify path/to/app.js -o path/to/app.bundle.js command (path are changed to match my working directories).
I then run into multiple Error: Cannot find module '[COMPONENT NAME]' from '[PROJECT PATH]\node_modules\[DEPENDENT COMPONENT NAME]' that resulted in me manually adding those components to package.json file individually.
browserify finally manage to compile without trouble after I modify the package.json file to following:
{
... OMITTED ...
"dependencies": {
"amp-bind": "^1.0.1",
"amp-each": "^1.0.1",
"amp-extend": "^1.0.1",
"amp-has": "^1.0.1",
"amp-index-of": "^1.1.0",
"amp-is-empty": "^1.0.2",
"amp-is-function": "^1.0.1",
"amp-is-object": "^1.0.1",
"amp-is-regexp": "^1.0.1",
"amp-iteratee": "^1.0.1",
"amp-keys": "^1.0.1",
"amp-once": "^1.0.1",
"amp-result": "^1.1.0",
"amp-unique-id": "^1.0.2",
"ampersand-app": "^1.0.0",
"ampersand-class-extend": "^1.0.1",
"ampersand-collection": "^1.4.2",
"ampersand-collection-rest-mixin": "^3.0.1",
"ampersand-collection-underscore-mixin": "^1.0.3",
"ampersand-collection-view": "^1.2.1",
"ampersand-dom": "^1.2.1",
"ampersand-dom-bindings": "^3.3.3",
"ampersand-form-view": "^2.0.0",
"ampersand-input-view": "^2.0.0",
"ampersand-model": "^4.0.0",
"ampersand-rest-collection": "^2.0.0",
"ampersand-router": "^1.0.1",
"ampersand-state": "^4.4.5",
"ampersand-version": "^1.0.2",
"ampersand-view": "^7.0.1",
"ampersand-view-switcher": "^1.0.2",
"andlog": "^1.0.0",
"array-next": "0.0.1",
"async": "^0.9.0",
"backbone-events-standalone": "^0.2.6",
"browserify": "^9.0.3",
"clientconfig": "^1.0.0",
"cookie-getter": "0.0.2",
"domify": "^1.3.0",
"domready": "^1.0.5",
"events-mixin": "^1.2.0",
"favicon-setter": "^0.1.1",
"get-object-path": "0.0.2",
"getconfig": "^1.0.0",
"hapi": "^8.0.0",
"key-tree-store": "^1.2.0",
"local-links": "^1.2.0",
"matches-selector": "^1.0.0",
"moonboots_hapi": "^4.0.0",
"qs": "^2.4.1",
"readable-stream": "^1.0.33",
"stylizer": "^1.0.0",
"templatizer": "^1.0.0",
"underscore": "^1.6.0",
"xhr": "^2.0.1",
"xtend": "^4.0.0"
},
"devDependencies": {},
.. OMITTED ..
}
While out of box dependencies in package.json file as follow:
{
... OMITTED ...
"dependencies": {
"ampersand-app": "^1.0.0",
"ampersand-dom": "^1.2.1",
"ampersand-form-view": "^2.0.0",
"ampersand-input-view": "^2.0.0",
"ampersand-model": "^4.0.0",
"ampersand-rest-collection": "^2.0.0",
"ampersand-router": "^1.0.1",
"ampersand-view": "^7.0.1",
"ampersand-view-switcher": "^1.0.2",
"andlog": "^1.0.0",
"async": "^0.9.0",
"clientconfig": "^1.0.0",
"domify": "^1.3.0",
"domready": "^1.0.5",
"favicon-setter": "^0.1.1",
"getconfig": "^1.0.0",
"hapi": "^8.0.0",
"local-links": "^1.2.0",
"moonboots_hapi": "^4.0.0",
"stylizer": "^1.0.0",
"templatizer": "^1.0.0",
"underscore": "^1.6.0"
},
"devDependencies": {},
... OMITTED ...
}
I felt I must have miss something obvious to have to add those dependencies manually? Any hints?
Environment:
- Windows 8.1 64-bit
- Node v0.12.0
- NPM v2.5.1
Aucun commentaire:
Enregistrer un commentaire