nrwl/nxを使用して私はprojectを持っており、自宅のコンピュータ(ウィンドウ)でワークスペース(morningharwood)とアプリケーション(portfolio)を開始しました。移動で、私は今、レポをyarn install
depsをクローンし、私のMacで実行しようとしました。 node_modules/.bin/ng serve --app=portfolio
を実行している場合残念ながら、私はそのCannot find module 'typescript' from '/Users/m/projects'
ローカルでのエラーを取得し、世界的に私はtypescriptですが、インストールがあります。<Path>から 'typescript'モジュールを見つけることができませんが、tsc -v logs
質問:私のプロジェクトはtypescriptですを見つけるカントはなぜ。私のMacでプロジェクトを実行するにはどうすればいいですか?
[email protected]: ~/projects/ on feature/prerender [?]
$ tsc -v
Version 2.6.1
[email protected]: ~/projects/morningharwood/platform on feature/prerender [?]
$ node_modules/.bin/ng serve --app=portfolio
Cannot find module 'typescript' from '/Users/m/projects'
Error: Cannot find module 'typescript' from '/Users/m/projects'
at Function.module.exports [as sync] (/Users/m/projects/morningharwood/platform/node_modules/resolve/lib/sync.js:40:15)
at Object.requireProjectModule (/Users/m/projects/morningharwood/platform/node_modules/@angular/cli/utilities/require-project-module.js:6:28)
at Object.readTsconfig (/Users/m/projects/morningharwood/platform/node_modules/@angular/cli/utilities/read-tsconfig.js:6:48)
at new NgCliWebpackConfig (/Users/mharwood/projects/morningharwood/platform/node_modules/@angular/cli/models/webpack-config.js:19:42)
at Class.run (/Users/m/projects/morningharwood/platform/node_modules/@angular/cli/tasks/serve.js:71:29)
at check_port_1.checkPort.then.port (/Users/m/projects/morningharwood/platform/node_modules/@angular/cli/commands/serve.js:123:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[email protected]: ~/projects/morningharwood/platform on feature/prerender [?]
package.json
"devDependencies": {
"ts-node": "^3.3.0",
"tsconfig-paths": "^2.3.0",
"tslint": "~5.3.2",
"typescript": "2.4.2",
}
アプリ内のpackage.jsonの場所はどこですか? node_modulesフォルダが作成された場所からng serveを実行する必要があります。 – Niladri
フルパスの代わりに 'ng serve --app = portfolio'を試してみましたか? – Niladri
@Niladriはい同じ問題です。 –