Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

yo backbone scaffolding failing due to "bower-requirejs.js" tasks...ERROR #370

Open
pmandala opened this issue Oct 14, 2015 · 2 comments
Open

Comments

@pmandala
Copy link

Unable to build backbone build

pmandala-mac:yoBackbone pmandala$ grunt build
Loading "bower-requirejs.js" tasks...ERROR

Error: Cannot find module 'bower'
Running "clean:dist" (clean) task

1 path cleaned.
Running "createDefaultTemplate" task

Running "jst:compile" (jst) task

Destination not written because compiled files were empty.
Running "sass:dist" (sass) task
Fatal error: undefined is not a function

Execution Time (2015-10-13 23:35:34 UTC)
loading tasks 771ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 96%
jst:compile 19ms ▇▇ 2%
Total 807ms

pmandala-mac:yoBackbone pmandala$ npm install --save bower-requirejs

[email protected] install /Users/pmandala/X-Work/yoBackbone/node_modules/grunt-sass/node_modules/node-sass
node scripts/install.js
Binary downloaded and installed at /Users/pmandala/X-Work/yoBackbone/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64/binding.node

[email protected] postinstall /Users/pmandala/X-Work/yoBackbone/node_modules/grunt-sass/node_modules/node-sass
node scripts/build.js
darwin-x64 exists; testing
module.js:355
Module._extensionsextension;
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/pmandala/X-Work/yoBackbone/node_modules/grunt-sass/node_modules/node-sass/lib/index.js:181:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
[email protected] /Users/pmandala/X-Work/yoBackbone
├── UNMET PEER DEPENDENCY bower@^1.x
└── [email protected]

npm WARN EPEERINVALID [email protected] requires a peer of bower@^1.x but none was installed.
npm WARN EPEERINVALID [email protected] requires a peer of bower@^1.x but none was installed.
npm WARN EPACKAGEJSON [email protected] No description
npm WARN EPACKAGEJSON [email protected] No repository field.
npm WARN EPACKAGEJSON [email protected] No license field.
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--save" "bower-requirejs"
npm ERR! node v0.12.5
npm ERR! npm v3.3.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

@bcfurtado
Copy link

problem:
[email protected] depends on [email protected] [1]
[email protected] is not compatible with node >= 0.12 [2]

solution:

  1. upgrade grunt-sass to the lastest version (today: [email protected]) [worked for me]
  2. downgrade your node to 0.10.38. [didn't try]

[1] https://www.npmjs.com/package/grunt-sass
[2] sass/node-sass#1001

@bcfurtado
Copy link

Other solution, that has also worked for me, was use the latest version of this project instead of the current release version (v0.3.5) installed by default.
Since the current version already use a new version of grunt-sass, your next project will not be affected with this issue. [1] But maybe can affected by other problems if master branch isn't stable. [2]

  • Find out where your node packages are installed. (/usr/local/lib/node_modules if you are using osx with brew)
  • Remove the generator-backbone folder.
  • Clone this project.
  • Open the cloned project folder.
  • Install all dependencies with: npm install
  • And run yo backbone again!

[1] https://github.com/yeoman/generator-backbone/blob/eebfec70d3681df01495797cf52e2fc28eb1d3ad/generators/app/templates/_package.json
[2] #357

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants