tbranyen / backbone-boilerplate

A workflow for building Backbone applications.
MIT License
4.47k stars 482 forks source link

Failed at the backbone-boilerplate@2.0.0 start script 'grunt'. #275

Closed jjoselv closed 7 years ago

jjoselv commented 8 years ago

I have just run npm install and then npm start and this happens:

C:\Users\Consultant\workspace\bill-management>npm start

> backbone-boilerplate@2.0.0 start C:\Users\Consultant\workspace\bill-management
> grunt

Running "jshint:development" (jshint) task
>> 5 files lint free.

Running "browserify:development" (browserify) task
>> Error: Cannot find module 'C:UsersConsultantworkspacill-managementapp♂iewslayoutspage.html' from 'C:\Users\Consultant\workspace\bill-management\app\views\pages'
Warning: Error running grunt-browserify. Use --force to continue.

Aborted due to warnings.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.4.1
npm ERR! npm  v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! backbone-boilerplate@2.0.0 start: `grunt`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the backbone-boilerplate@2.0.0 start script 'grunt'.
npm ERR! This is most likely a problem with the backbone-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs backbone-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls backbone-boilerplate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Consultant\workspace\bill-management\npm-debug.log
NocheVolta commented 8 years ago

Same error here.

npm-debug.txt

relu-xz commented 8 years ago

I does not work on Windows 8.1 (x64):

Running "browserify:development" (browserify) task
Verifying property browserify.development exists in config...OK
Files: app/index.js -> dist/source.js
Options: banner="", transform=[["combynify",{"root":"./app/views"}],"babelify"],
 watch, browserifyOptions={"debug":true}
>> Error: Cannot find module 'D:DevelopmentJavaScripackbone-boilerplateapp♂iewsl
ayoutspage.html' from 'D:\Development\JavaScript\backbone-boilerplate\app\views\
pages'
Warning: Error running grunt-browserify. Use --force to continue.

Aborted due to warnings.

It works very good on my Ubuntu.

PD: I'm using latest Node.js and npm (x64).

s3c0nDD commented 8 years ago

for me also it doent work on windows, i switched to linux and its working.

ghost commented 8 years ago

same error on windows 10 64bit

tbranyen commented 8 years ago

I don't use Windows, but looks like we have some path separator issues.

stepheljobs commented 8 years ago

Updates? :)

alborq commented 8 years ago

same error on w10X64 with Node 4.4.7x64

On debian :

$ npm install
npm WARN optional Skipping failed optional dependency /grunt-browserify/watchify/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN optional Skipping failed optional dependency /karma/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
17 error Linux 3.16.0-4-amd64
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v6.3.1
20 error npm  v3.10.3
21 error code ELIFECYCLE
22 error backbone-boilerplate@2.0.0 start: `grunt`
22 error Exit status 3
23 error Failed at the backbone-boilerplate@2.0.0 start script 'grunt'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the backbone-boilerplate package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     grunt
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs backbone-boilerplate
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls backbone-boilerplate
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

How fix ?

adamlesniak commented 8 years ago

Same issue on Windows 7 x64 - npm 3.10.9

bretonio commented 7 years ago

Same issue on Arch Linux (ApricityOS) ...

0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli   '/home/bretonio/.nvm/versions/node/v0.12.7/bin/npm',
1 verbose cli   'start' ]
2 info using npm@3.10.9
3 info using node@v0.12.7
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle backbone-boilerplate@2.0.0~prestart: backbone-boilerplate@2.0.0
6 silly lifecycle backbone-boilerplate@2.0.0~prestart: no script for prestart, continuing
7 info lifecycle backbone-boilerplate@2.0.0~start: backbone-boilerplate@2.0.0
8 verbose lifecycle backbone-boilerplate@2.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle backbone-boilerplate@2.0.0~start: PATH: /home/bretonio/.nvm/versions/node/v0.12.7/lib/node_modules/npm/bin/node-gyp-bin:/home/bretonio/backbone-boilerplate/node_modules/.bin:/usr/local/heroku/bin:/home/bretonio/.rvm/gems/ruby-2.3.1/bin:/home/bretonio/.rvm/gems/ruby-2.3.1@global/bin:/home/bretonio/.rvm/rubies/ruby-2.3.1/bin:/home/bretonio/.nvm/versions/node/v0.12.7/bin:/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/bretonio/.rvm/bin:/home/bretonio/.rvm/bin:/home/bretonio/.rvm/bin
10 verbose lifecycle backbone-boilerplate@2.0.0~start: CWD: /home/bretonio/backbone-boilerplate
11 silly lifecycle backbone-boilerplate@2.0.0~start: Args: [ '-c', 'grunt' ]
12 silly lifecycle backbone-boilerplate@2.0.0~start: Returned: code: 1  signal: null
13 info lifecycle backbone-boilerplate@2.0.0~start: Failed to exec start script
14 verbose stack Error: backbone-boilerplate@2.0.0 start: `grunt`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/home/bretonio/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at EventEmitter.emit (events.js:110:17)
14 verbose stack     at ChildProcess.<anonymous> (/home/bretonio/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at ChildProcess.emit (events.js:110:17)
14 verbose stack     at maybeClose (child_process.js:1015:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
15 verbose pkgid backbone-boilerplate@2.0.0
16 verbose cwd /home/bretonio/backbone-boilerplate
17 error Linux 4.8.10-1-ARCH
18 error argv "node" "/home/bretonio/.nvm/versions/node/v0.12.7/bin/npm" "start"
19 error node v0.12.7
20 error npm  v3.10.9
21 error code ELIFECYCLE
22 error backbone-boilerplate@2.0.0 start: `grunt`
22 error Exit status 1
23 error Failed at the backbone-boilerplate@2.0.0 start script 'grunt'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the backbone-boilerplate package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     grunt
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs backbone-boilerplate
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls backbone-boilerplate
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
p01000 commented 7 years ago

combynify's problem

tbranyen commented 7 years ago

@p01000 whats the fix here?

p01000 commented 7 years ago

partials = Object.keys(template._partials).map(function(name) { return '"' + name + '": require("' + template._partials[name].replace(/\/ig, '/') + '")'; });

tbranyen commented 7 years ago

Sorry, I'm not sure I see how this code would cause npm to break per the issue. Are you seeing a different problem? Whoops I just read the above comment and re-read the full issue. Sorry! Sorry! Its late my time :sleeping:

So there's something up with the filepath being the wrong path separator or something?

p01000 commented 7 years ago

node_modules/combynify/index.js line 77 add ".replace(/\/ig, '/') + '")'"

tbranyen commented 7 years ago

Oddly enough this problem has never occurred for me. npm start works perfectly in Arch Linux.

tbranyen commented 7 years ago

Sure, but why is that needed?

p01000 commented 7 years ago

perhaps path separator issues on windows

tbranyen commented 7 years ago

yeah that makes sense, was thinking of possibly using require('path').sep but that seems like overkill

tbranyen commented 7 years ago

I think we should normalize all the paths not just the partials, but thanks for bringing that root cause up!

tbranyen commented 7 years ago

@p01000 pushed a fix to master, can you confirm the fix works?

tbranyen commented 7 years ago

I'll assume it works, closing for now.

p01000 commented 7 years ago

i'm not sure i want to find another way to fix it