我有一个快速打字稿项目。
当我运行项目时(使用命令npm start
)
我得到以下信息:
@ruler-mobility/ruler@1.0.0 serve /Users/macbook/Desktop/develop/rails-projects/ruler
> node src/app.js
internal/modules/cjs/loader.js:775
throw err;
^
Error: Cannot find module '@ruler/configs'
Require stack:
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/utils/createRequestHandler.js
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/utils/index.js
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/errors/404/index.js
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/errors/index.js
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/index.js
- /Users/macbook/Desktop/develop/rails-projects/ruler/src/app.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (/Users/macbook/Desktop/develop/rails-
projects/ruler/src/utils/createRequestHandler.js:14:17)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Module.require (internal/modules/cjs/loader.js:830:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/macbook/Desktop/develop/rails-projects/ruler/src/utils/createRequestHandler.js',
'/Users/macbook/Desktop/develop/rails-projects/ruler/src/utils/index.js',
/Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/errors/404/index.js',
'/Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/errors/index.js',
'/Users/macbook/Desktop/develop/rails-projects/ruler/src/middleware/index.js',
'/Users/macbook/Desktop/develop/rails-projects/ruler/src/app.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
我将“ config”模块导入一个文件:
/Users/macbook/Desktop/develop/rails-projects/ruler/src/utils/createRequestHandler.js'
通过使用import { REQUEST_CONFIGS } from '../configs';
有人可以告诉我是什么导致了错误,如果您需要更多信息,请告诉我。呆了一天,请救救我。甚至可以猜测,例如:导入可能是循环的,也可能是您所做的任何事情。预先谢谢你