Bug 1252237 - grunt does not find grunt.js [NEEDINFO]
grunt does not find grunt.js
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: nodejs-grunt-cli (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: NodeJS Packaging SIG
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 23:47 EDT by Orion Poplawski
Modified: 2017-12-12 05:04 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-12 05:04:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mrunge: needinfo? (jamielinux)


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2015-08-10 23:47:46 EDT
Description of problem:

$ grunt
grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started


It seems it's not finding /usr/lib/node_modules/grunt/lib/grunt.js

$ strace grunt 2>&1 | grep -F grunt.js
stat("/home/orion/redhat/js-jquery-backstretch-2.0.4/jquery-backstretch-2.0.4/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("/home/orion/redhat/js-jquery-backstretch-2.0.4/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("/home/orion/redhat/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("/home/orion/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("/home/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("/node_modules/grunt.js", 0x7ffdf3496298) = -1 ENOENT (No such file or directory)
stat("lib/grunt.js", 0x7ffdf3495b28)    = -1 ENOENT (No such file or directory)
stat("/home/orion/redhat/js-jquery-backstretch-2.0.4/lib/grunt.js", 0x7ffdf3495b28) = -1 ENOENT (No such file or directory)
stat("/home/orion/redhat/lib/grunt.js", 0x7ffdf3495b28) = -1 ENOENT (No such file or directory)
stat("/home/orion/lib/grunt.js", 0x7ffdf3495b28) = -1 ENOENT (No such file or directory)
stat("/home/lib/grunt.js", 0x7ffdf3495b28) = -1 ENOENT (No such file or directory)
stat("/lib/grunt.js", 0x7ffdf3495b28)   = -1 ENOENT (No such file or directory)

Version-Release number of selected component (if applicable):
nodejs-grunt-cli-0.1.13-2.fc21.noarch
Comment 1 Fedora End Of Life 2015-11-04 05:54:09 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Matthias Runge 2016-04-26 17:19:59 EDT
still valid on f23
Comment 3 Matthias Runge 2016-04-26 17:20:37 EDT
Is there anything missing or anything we can do to support you in fixing the issue?
Comment 4 Matthias Runge 2016-04-27 17:01:37 EDT
I briefly updated to 1.2.0, but the problem still exists. I wonder if it's a more generic issue.
Comment 5 Matthias Runge 2016-08-26 06:00:00 EDT
grunt seems to work if you're in the dir with your Gruntfils.js and do:
ln -s /usr/lib/node_modules
Comment 6 Piotr Popieluch 2016-08-26 14:27:14 EDT
yes, grunt really wants to be installed in the project directory and run from there. In nodejs packages which require grunt the node_modules are symlinked.

Not sure if there is anything we can/need/should to do here.
Comment 7 Orion Poplawski 2016-09-07 13:47:55 EDT
Perhaps worth having a %grunt rpm macro the would do what is needed to build a project?
Comment 8 Piotr Popieluch 2016-09-08 16:18:26 EDT
Not sure what you mean with a project. 

If you are building a nodejs rpm package use `%nodejs_symlink_deps --check` as described in the guidelines [1] or see [2] as example.

If you working on some nodejs project you probably use `npm install` anyway which installs all deps in the working dir.


[1] https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/Packagers#Build_testing_in_.25check
[2] http://pkgs.fedoraproject.org/cgit/rpms/nodejs-grunt-banner.git/tree/nodejs-grunt-banner.spec#n63
Comment 9 Piotr Popieluch 2016-09-08 16:21:50 EDT
This might be a better (actually working) example:
http://pkgs.fedoraproject.org/cgit/rpms/nodejs-grunt-legacy-log-utils.git/tree/nodejs-grunt-legacy-log-utils.spec#n51
Comment 10 Fedora End Of Life 2016-11-24 07:17:18 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 11 Fedora End Of Life 2017-11-16 14:03:53 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 12 Fedora End Of Life 2017-12-12 05:04:56 EST
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.