غير قادر على العثور على النخر المحلي عند استخدام قوالب ngung

StackOverflow https://stackoverflow.com//questions/20000340

  •  20-12-2019
  •  | 
  •  

سؤال

باتباع التعليمات الخاصة بإعداد القوالب الزاويّة الناخر: https://npmjs.org/package/grunt-angular-templates

أقوم بتثبيت قالب الناخر الزاوي عن طريق القيام بما يلي:

npm install grunt-angular-templates --save-dev

يتم تثبيته.

إن package.json الخاص بي بسيط للغاية:

{
  "name": "grunt_example2",
  "version": "0.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "grunt-angular-templates": "~0.4.7"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "BSD-2-Clause"
}

وقمت بإنشاء Gruntfile.js كـ

module.exports = function(grunt) {
  grunt.loadTasks('grunt-angular-templates');
}

عندما أفعل:

grunt ngtemplates

انا حصلت:خطأ فادح:غير قادر على العثور على الناخر المحلي.

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

لكن هذا لا يعطيني شيئًا عن كيفية حل هذه المشكلة.

أي نصائح؟

شكرًا.

هل كانت مفيدة؟

المحلول

تحتاج إلى تثبيت الناخر في مشروعك.انظر هنا: http://gruntjs.com/getting-started#installing-grunt-and-gruntplugins

npm install grunt --save-dev

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top