в моем приложении angular нет синтаксической ошибки.
В файле с именем test1. js У меня есть только одна строка
var express = require('express');
, но вот мой журнал ошибок
(буквально для эта строка, если я закомментирую, все хорошо)
WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
ERROR in ./node_modules/cookie-signature/index.js
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\cookie-signature'
ERROR in ./node_modules/etag/index.js
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\etag'
ERROR in ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\destroy'
ERROR in ./node_modules/etag/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\etag'
ERROR in ./node_modules/express/lib/view.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/mime/mime.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\mime'
ERROR in ./node_modules/send/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\send'
ERROR in ./node_modules/express/lib/application.js
Module not found: Error: Can't resolve 'http' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/express/lib/request.js
Module not found: Error: Can't resolve 'http' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/express/lib/response.js
Module not found: Error: Can't resolve 'http' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/express/lib/request.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/content-disposition/index.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\content-disposition'
ERROR in ./node_modules/express/lib/application.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/express/lib/response.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/express/lib/view.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\express\lib'
ERROR in ./node_modules/mime/mime.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\mime'
ERROR in ./node_modules/mime-types/index.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\mime-types'
ERROR in ./node_modules/send/index.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\send'
ERROR in ./node_modules/serve-static/index.js
Module not found: Error: Can't resolve 'path' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\serve-static'
ERROR in ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'stream' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\destroy'
ERROR in ./node_modules/send/index.js
Module not found: Error: Can't resolve 'stream' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\send'
ERROR in ./node_modules/body-parser/lib/read.js
Module not found: Error: Can't resolve 'zlib' in 'C:\Users\X\Desktop\angular_practise\restTest5\node_modules\body-parser\lib'
[обратите внимание, что: я уже сделал npm i express --save
]
[еще одна интересная вещь: если я запускаю. js файл как node.js приложение (node test1.js
), все работает отлично]
Пожалуйста, укажите, что пошло не так, я не могу найти никакой подсказки.