Closed thkoch2001 closed 9 years ago
You don't need to use requirejs. You have to include the angular-hint.js from the dist/ folder, that's all.
I searched angular-hint with bower, installed it and there is no dist folder. How should I get angular-hint? bower, npm, tar.gz?
I installed it from npm and that one has a dist folder.
+1
:+1: I like to add it to a rails project using rails-assets.org.
+1
+1
+1
+1
+1
+1
+1
this! I just want to debug not build things!
@Dennis-Janssen is correct, you should be including this from npm
Why does angular provide a bower install but angular-hint does not?
@SomeKittens not everyone uses npm. @TusharaFernando is correct, if angular themselves provide a bower version surely you could at least include a /dist version in this repository so that those of us using bower don't have to use two systems.
While we use NPM and Bower, its confusing to have angular itself available in both but not angular-hint. Think maintainability with larger teams. Having to remember that, albeit small, difference adds to complexity...
Just not all of us use npm/bower etc. so have to install a framework to make it work its an unnecessary effort, and will only take you 3 secs to compile and upload it to your rep, (we all win)
Having the same issue as original poster:
ReferenceError: require is not defined
angular.hint = require('angular-hint-log');
And to confirm, there is no dist/ folder in either the npm or bower installed versions.
@cmperez I have the same problem no dist/ folder in either the npm or bower installed versions
@cmperez require() is used by node (as for other systems), and @ouchxp dest will not appear because was added to the .gitignore , anyways the hints.js is what are you looking, but you need nodejs or compile hints.js
@QuijoteShin Tried to build it for serveral hours. Still fail to generate dest folder.
D:\angular\THQFrontEnd\node_modules\angular-hint>npm run build
> angular-hint@0.3.0 build D:\angular\THQFrontEnd\node_modules\angular-hint
> gulp build
module.js:338
throw err;
^
Error: Cannot find module 'st'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (D:\angular\THQFrontEnd\node_modules\angular-hint\gulpfile.js:6:10)
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)
at Module.require (module.js:365:17)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! angular-hint@0.3.0 build: `gulp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-hint@0.3.0 build script 'gulp build'.
npm ERR! This is most likely a problem with the angular-hint package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-hint
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\angular\THQFrontEnd\node_modules\angular-hint\npm-debug.log
See if this works for you: https://github.com/welbornio/angular-hint-bower
On Tue, Jun 23, 2015 at 3:39 PM, Nan notifications@github.com wrote:
@QuijoteShin https://github.com/QuijoteShin
Tried to build it for serveral hours. Still fail to generate dest folder.
D:\angular\THQFrontEnd\node_modules\angular-hint>npm run build
angular-hint@0.3.0 build D:\angular\THQFrontEnd\node_modules\angular-hint gulp build
module.js:338 throw err; ^ Error: Cannot find module 'st' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.
(D:\angular\THQFrontEnd\node_modules\angular-hint\gulpfile.js:6:10) 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) at Module.require (module.js:365:17) npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! code ELIFECYCLE npm ERR! angular-hint@0.3.0 build:
gulp build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-hint@0.3.0 build script 'gulp build'. npm ERR! This is most likely a problem with the angular-hint package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! gulp build npm ERR! You can get their info via: npm ERR! npm owner ls angular-hint npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! D:\angular\THQFrontEnd\node_modules\angular-hint\npm-debug.log
— Reply to this email directly or view it on GitHub https://github.com/angular/angular-hint/issues/55#issuecomment-114649263 .
@ouchxp delete ./node_modules do a" npm install" and then "npm run build". you will have a clean "node_modules" . it works for me it that way
@QuijoteShin Still not working, here is the npm-debug.log file. I probably will go with @welbornio 's approach.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@2.10.1
3 info using node@v0.12.4
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild angular-hint@0.3.0
6 info build angular-hint@0.3.0
7 verbose unsafe-perm in lifecycle true
8 info angular-hint@0.3.0 Failed to exec build script
9 verbose stack Error: angular-hint@0.3.0 build: `gulp build`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack at EventEmitter.emit (events.js:110:17)
9 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at ChildProcess.emit (events.js:110:17)
9 verbose stack at maybeClose (child_process.js:1015:16)
9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid angular-hint@0.3.0
11 verbose cwd D:\angular\THQFrontEnd\node_modules\angular-hint
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
14 error node v0.12.4
15 error npm v2.10.1
16 error code ELIFECYCLE
17 error angular-hint@0.3.0 build: `gulp build`
17 error Exit status 1
18 error Failed at the angular-hint@0.3.0 build script 'gulp build'.
18 error This is most likely a problem with the angular-hint package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error gulp build
18 error You can get their info via:
18 error npm owner ls angular-hint
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
@ouchxp better do that, its ready to use. but with node
@welbornio @QuijoteShin I've added the hint.js and added ng-hint attribute, but it does not show any log message, any thoughts?
Found it... https://github.com/angular/angular-hint/issues/81
I know we should use requirejs, unfortunately we don't yet. So trying to use angular-hint fails with:
Can you make it possible for people to use angular-hint without requirejs?
BTW: Shouldn't there be a dependency on angular-hint-log in the bower.json of angular-hint?