我如何解决项目MEAN错误



我有问题运行grunt

 "Cannot find module './api" 

行错误路由。js ->图像结构项目app.use('/api/things', require('./apithing'));

但是这个模块在我的项目。我用你的angular-fullstack创建项目。

我不明白问题是什么。有人帮我吗?有人能帮我吗?

Running "mochaTest:unit" (mochaTest) task
>> Mocha exploded!
>> Error: Cannot find module './api     hing'
>>     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 module.exports (C:/Users/Jonathan/Documents/bdsmeanshop/server/routes.js:13:26)
>>     at Object.<anonymous> (C:/Users/Jonathan/Documents/bdsmeanshop/server/app.js:33:20)
>>     at Module._compile (module.js:460:26)
>>     at normalLoader (C:UsersJonathanDocumentsbdsmeanshopnode_modulesbabel-corelibapiregisternode.js:199:5)
>>     at Object.require.extensions.(anonymous function) [as .js] (C:UsersJonathanDocumentsbdsmeanshopnode_modulesbabel-corelibapiregisternode.js:216:7)
>>     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.<anonymous> (C:/Users/Jonathan/Documents/bdsmeanshop/server/api/user/user.model.spec.js:3:11)
>>     at Module._compile (module.js:460:26)
>>     at normalLoader (C:UsersJonathanDocumentsbdsmeanshopnode_modulesbabel-corelibapiregisternode.js:199:5)
>>     at Object.require.extensions.(anonymous function) [as .js] (C:UsersJonathanDocumentsbdsmeanshopnode_modulesbabel-corelibapiregisternode.js:216:7)
>>     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 C:UsersJonathanDocumentsbdsmeanshopnode_modulesmochalibmocha.js:220:27
Warning: Task "mochaTest:unit" failed. Use --force to continue.
Aborted due to warnings.

移动评论作为答案

你不是在转义t吗?app.use (/api/事情,需要(',/api '));试一试。/api/事。错误提示不能找到'./api hing'

相关内容

  • 没有找到相关文章

最新更新