npm run start 工作正常,但 npm run start: dev 抛出此错误:
\n\n7:14:22 PM - Found 0 errors. Watching for file changes.\ninternal/modules/cjs/loader.js:638\nthrow err;\n^\nError: Cannot find module \'src/models/note.model\'\nat Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)\nat Function.Module._load (internal/modules/cjs/loader.js:562:25)\nat Module.require (internal/modules/cjs/loader.js:692:17)\nat require (internal/modules/cjs/helpers.js:25:18)\nat Object.<anonymous> (C:\\Users\\Anuitex-169\\Desktop\\VersF\\nest\\server\\dist\\note\\note.service.js:17:22)\nat Module._compile (internal/modules/cjs/loader.js:778:30)\nat Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\nat Module.load (internal/modules/cjs/loader.js:653:32)\nat tryModuleLoad (internal/modules/cjs/loader.js:593:12)\nat Function.Module._load (internal/modules/cjs/loader.js:585:3)\nRun Code Online (Sandbox Code Playgroud)\n\n这个错误从我的项目一开始就出现了,我不明白为什么。我决定忘记这个问题,因为 npm run start 效果很好。但不知怎的有点不舒服(
\n\n我的 app.module.ts \n我的 package.json 文件:
\n\n {\n "name": "server",\n "version": "0.0.1",\n "description": "",\n "author": "",\n "license": "MIT",\n "scripts": {\n "build": "rimraf dist && tsc -p tsconfig.build.json",\n "format": "prettier …Run Code Online (Sandbox Code Playgroud)