Я беру унаследованный проект.Я в основном программист бэкэнда и не знаком с последними инструментами сборки JS.Я пытаюсь понять, как проект составлен.В проекте используется response-app-rewired .npm run start-js
производит огромное количество , прежде чем сервер будет готов.Похоже, что за 10 с тысяч строк, за 2 минуты до готовности сервера:
======== Resolving type reference directive 'async', containing file '/vagrant/client/__inferred type names__.ts', root directory '/vagrant/client/node_modules/@types'. ========
Resolving with primary search path '/vagrant/client/node_modules/@types'.
'package.json' does not have a 'typings' field.
'package.json' does not have a 'types' field.
'package.json' has 'main' field '' that references '/vagrant/client/node_modules/@types/async'.
Found 'package.json' at '/vagrant/client/node_modules/@types/async/package.json'. Package ID is '@types/async/.d.ts@2.0.47'.
'package.json' does not have a 'typings' field.
'package.json' does not have a 'types' field.
File '/vagrant/client/node_modules/@types/async/index.d.ts' exist - use it as a name resolution result.
Resolving real path for '/vagrant/client/node_modules/@types/async/index.d.ts', result '/vagrant/client/node_modules/@types/async/index.d.ts'.
======== Type reference directive 'async' was successfully resolved to '/vagrant/client/node_modules/@types/async/index.d.ts', primary: true. ========
======== Resolving type reference directive 'chrome', containing file '/vagrant/client/__inferred type names__.ts', root directory '/vagrant/client/node_modules/@types'. ========
и более:
Resolution for module 'apollo-mutation-state' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'apollo-mutation-state' was successfully resolved to '/vagrant/client/node_modules/apollo-mutation-state/lib/index.js'. ========
======== Resolving module 'graphql/auth/signInMutation.graphql' from '/vagrant/client/src/containers/users/SetResetPassword.tsx'. ========
Resolution for module 'graphql/auth/signInMutation.graphql' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'graphql/auth/signInMutation.graphql' was not resolved. ========
======== Resolving module 'moment-timezone' from '/vagrant/client/src/containers/users/SetResetPassword.tsx'. ========
Resolution for module 'moment-timezone' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'moment-timezone' was successfully resolved to '/vagrant/client/node_modules/@types/moment-timezone/index.d.ts'. ========
======== Resolving module 'components/form/validation' from '/vagrant/client/src/containers/users/SetResetPassword.tsx'. ========
Resolution for module 'components/form/validation' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'components/form/validation' was successfully resolved to '/vagrant/client/src/components/form/validation.ts'. ========
======== Resolving module 'types' from '/vagrant/client/src/containers/users/SetResetPassword.tsx'. ========
Resolution for module 'types' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'types' was successfully resolved to '/vagrant/client/src/types.ts'. ========
======== Resolving module 'react' from '/vagrant/client/src/containers/users/SignInUserWrapper.tsx'. ========
Resolution for module 'react' was found in cache from location '/vagrant/client/src/containers/users'.
======== Module name 'react' was successfully resolved to '/vagrant/client/node_modules/@types/react/index.d.ts'. ========
и более:
Directory '/vagrant/client/src/containers/conversations/node_modules' does not exist, skipping all lookups in it.
Directory '/vagrant/client/src/containers/node_modules' does not exist, skipping all lookups in it.
Directory '/vagrant/client/src/node_modules' does not exist, skipping all lookups in it.
(node_modules находятся в /vagrant/client/node_modules
)
Тогда это успешно, и все мои JS работают, как ожидалось.Я предполагаю, что есть что-то неправильно настроенное с путями поиска или что-то.В чем дело?Это нормальное поведение?Это все о типах или о других вещах?
Версии
- машинопись 2.9.2 (также пробовал 3.4.3, похоже, такое же поведение)
- response-scripts-ts 2.17.0
- response-app-rewired 1.6.2
- реаги ^ 16.3.0