Whenever I run my React Native project (after removing node_modules, .gradle, .idea, android/app/build, android/build)
I get the following error in my metro server:
info Reloading app...
[Fri Jun 11 2021 14:46:49.120] BUNDLE ./index.js
[Fri Jun 11 2021 14:46:50.778] ERROR ReferenceError: Can't find variable: r
[Fri Jun 11 2021 14:46:50.780] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
[Fri Jun 11 2021 14:46:50.782] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
exported = true is in all my activity entries in manifest:
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"
android:exported="true"/>
This is my package.json:
{
"name": "HeraMedica",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start --reset-cache",
"test": "jest",
"lint": "eslint .",
"postinstall": "patch-package"
},
"dependencies": {
"#react-native-async-storage/async-storage": "^1.15.4",
"#react-native-community/clipboard": "^1.5.1",
"#react-native-community/datetimepicker": "^2.6.2",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/netinfo": "^6.0.0",
"#react-native-google-signin/google-signin": "^6.0.0",
"#react-native-picker/picker": "^1.15.0",
"#react-navigation/drawer": "^5.12.5",
"#react-navigation/material-top-tabs": "^5.3.15",
"#react-navigation/native": "^5.9.3",
"#react-navigation/stack": "^5.14.3",
"moment": "^2.29.1",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-crypto-js": "^1.0.0",
"react-native-fbsdk": "^3.0.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-keyboard-aware-scroll-view": "^0.9.4",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^2.1.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-material-textfield": "^0.16.1",
"react-native-modal-datetime-picker": "^9.2.3",
"react-native-pager-view": "^5.1.10",
"react-native-picker-select": "^8.0.4",
"react-native-reanimated": "^2.1.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^2.18.1",
"react-native-switch": "^2.0.0",
"react-native-tab-view": "^3.0.1",
"react-native-table-component": "^1.2.1",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"#babel/core": "^7.8.4",
"#babel/runtime": "^7.8.4",
"#react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.5.1",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
UPDATE:
When I am in another branch of the same repository using same package.json configuration, I am getting other errors:
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:592:3)
at tryReadSync (fs.js:366:20)
at Object.readFileSync (fs.js:403:19)
at UnableToResolveError.buildCodeFrameMessage (/Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:304:17)
at new UnableToResolveError (/Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (/Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (/Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
at /Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/lib/transformHelpers.js:271:42
at Server.<anonymous> (/Users/lion/Documents/Companies/Flex_project/TeleMedicine/React/node_modules/metro/src/Server.js:842:41)
at Generator.next (<anonymous>)
I located the error using debugging:
The screenshot for how debugging help out to find this bug.
However there are other series of bugs. One of my developers has done mischief.
Related
I just wanted to try react-native. However I get this error. Metro has encountered an error: Cannot read property 'transformFile' of undefined. I tried it on my physical device and emulator and the error is same. I am getting this in my console "Failed to construct transformer: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)"
Here is my package.json file
{
"name": "XYZ",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "prettier --write src/**/*.{ts,tsx} && eslint src/**/*.{ts,tsx}"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn test"
}
},
"dependencies": {
"#apollo/react-hooks": "^3.1.5",
"#react-native-community/async-storage": "^1.12.0",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/netinfo": "^5.9.6",
"#react-navigation/drawer": "^5.9.0",
"#react-navigation/native": "^5.7.3",
"#react-navigation/stack": "^5.9.0",
"#types/react-native-auth0": "^2.5.0",
"apollo-boost": "^0.4.9",
"babel": "^6.23.0",
"babel-core": "^6.26.3",
"babel-upgrade": "^1.0.1",
"date-fns": "^2.16.1",
"metro-config": "^0.59.0",
"react": "^16.13.1",
"react-native": "^0.62.2",
"react-native-auth0": "^2.5.0",
"react-native-dotenv": "^0.2.0",
"react-native-elements": "^2.2.1",
"react-native-gesture-handler": "^1.8.0",
"react-native-google-places-autocomplete": "^1.8.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-reanimated": "^1.13.0",
"react-native-safe-area-context": "^1.0.0",
"react-native-screens": "^2.10.1",
"react-native-skeleton-placeholder": "^2.0.7",
"react-native-step-indicator": "^1.0.3",
"react-native-svg": "^12.1.0",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^2.15.1",
"react-native-vector-icons": "^7.0.0",
"reanimated-bottom-sheet": "^1.0.0-alpha.20"
},
"devDependencies": {
"#babel/core": "^7.11.1",
"#babel/runtime": "^7.11.2",
"#react-native-community/eslint-config": "^1.0.0",
"#types/jest": "^24.0.24",
"#types/react-native": "^0.62.0",
"#types/react-native-dotenv": "^0.2.0",
"#types/react-test-renderer": "^16.9.3",
"#typescript-eslint/eslint-plugin": "^2.34.0",
"#typescript-eslint/parser": "^2.27.0",
"babel-jest": "^24.9.0",
"eslint": "^7.7.0",
"eslint-config-airbnb-typescript": "^7.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.0",
"husky": "^4.2.5",
"jest": "^26.4.0",
"metro-react-native-babel-preset": "^0.58.0",
"node-sass": "^4.14.1",
"prettier": "^2.0.5",
"react-native-sass-transformer": "^1.4.0",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "^16.13.1",
"ts-jest": "^26.2.0",
"typescript": "^3.9.7"
}
}
I uninstalled latest version of node and installed LTS(long term support) of node, and it started working
I encountered this error when upgraded react-native version to 0.63.0. I searched this error but according to other sources it is either problem in react-native-material-dropdown or in react-native-material-textfield. I have also tried to look for Animated.Text.propTypes in node_modules but it does not exist. Although i found it in main.bundle.js in ios folder.
My Pod file is as following:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'Project_name' do
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
Package.json file is as following:
{
"name": "Project_name",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/async-storage": "^1.12.0",
"#react-native-community/datetimepicker": "^3.0.1",
"#react-native-community/masked-view": "^0.1.10",
"#react-navigation/native": "^5.7.3",
"#react-navigation/stack": "^5.9.0",
"accordion-collapse-react-native": "^0.3.2",
"axios": "^0.20.0",
"date-fns": "^2.16.1",
"debounce": "^1.2.0",
"fetch-timeout": "0.0.2",
"http": "0.0.1-security",
"https": "^1.0.0",
"install": "^0.13.0",
"lodash": "^4.17.20",
"moment": "^2.27.0",
"native-base": "^2.13.14",
"npm": "^6.14.8",
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-af-video-player": "^0.2.1",
"react-native-asset-library-to-base64": "^1.1.0",
"react-native-autocomplete-input": "^4.2.0",
"react-native-aws3": "0.0.9",
"react-native-background-upload": "^6.1.0",
"react-native-beautiful-video-recorder": "^2.0.1",
"react-native-camera": "^3.38.0",
"react-native-check-box": "^2.1.7",
"react-native-checkbox": "^2.0.0",
"react-native-cookies": "^3.3.0",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^6.0.1",
"react-native-dropdown-picker": "^3.6.8",
"react-native-event-listeners": "^1.0.7",
"react-native-fs": "^2.16.6",
"react-native-gallery-manager": "^1.0.9",
"react-native-gesture-handler": "^1.7.0",
"react-native-image-picker": "^2.3.3",
"react-native-keep-awake": "^4.0.0",
"react-native-keyboard-aware-scroll-view": "^0.9.2",
"react-native-keychain": "^6.1.1",
"react-native-material-buttons": "^0.6.0",
"react-native-modal-datetime-picker": "^8.9.3",
"react-native-modal-dropdown": "^0.6.2",
"react-native-navybits-date-time-picker": "^1.2.3",
"react-native-permissions": "^2.2.0",
"react-native-reanimated": "^1.13.0",
"react-native-safe-area-context": "^3.1.7",
"react-native-screens": "^2.10.1",
"react-native-stopwatch-timer": "0.0.21",
"react-native-touch-id": "^4.4.1",
"react-native-video": "^5.1.0-alpha8",
"react-native-video-editor": "^0.2.0",
"react-native-walkthrough-tooltip": "^1.1.10",
"react-navigation": "^4.4.0",
"realm": "^6.1.0"
},
"devDependencies": {
"#babel/core": "7.11.5",
"#babel/runtime": "7.11.2",
"#react-native-community/eslint-config": "1.1.0",
"babel-jest": "25.5.1",
"eslint": "6.8.0",
"jest": "25.5.4",
"metro-react-native-babel-preset": "0.59.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
Anyone suffering from this nightmare it was react-native-material-button that was causing this issue. Turns out that vs code do not completely search node modules.
I am trying to run my app on Android but I am getting this error I don't know why I am getting this, I don't know what is causing this error in my project
I have tried tried many ways to resolve this issue but Still wasn't able to resolve this issue.
Tried To register two Views with the same name RTCVideoView
My Package.json is
{
"name": "Hello World",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#ptomasroos/react-native-multi-slider": "^1.0.0",
"#react-native-community/async-storage": "^1.6.2",
"#react-native-community/slider": "^2.0.0",
"axios": "^0.19.0",
"connectycube-reactnative": "^1.7.3",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-autogrow-textinput": "^5.2.0",
"react-native-cache-store": "^1.0.2",
"react-native-calendars": "^1.212.0",
"react-native-deck-swiper": "^1.6.7",
"react-native-image-picker": "^1.1.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-modal-datetime-picker": "^7.5.0",
"react-native-navigation": "^3.0.0",
"react-native-scrollable-tab-view": "^0.10.0",
"react-native-swiper": "^1.5.14",
"react-native-vector-icons": "^6.6.0",
"react-native-view-overflow": "^0.0.4",
"react-native-webrtc": "^1.75.0",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-prompt": "^1.0.4"
},
"devDependencies": {
"#babel/core": "^7.6.0",
"#babel/runtime": "^7.6.0",
"#react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.4.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}
Any Help Would be Appreciated.
All you need is just clean up the cache by the following command
npm cache clean --force
This will resolve your problem most probably
The version of react-native-webrtc you have specified in your package.json is different from the version that connectycube-reactnative depends on. The latest connectycube-reactnative (1.8.0) depends on "react-native-webrtc": "1.69.1".
Double check the dependency of the version you have installed by looking at the node_modules/connectycube-reactnative/package.json and match the version specified in your package.json to the version the connectycube-reactnative requires.
The #arzundo answer is correct
And seems this issue is addressed in latest releases here https://github.com/ConnectyCube/connectycube-reactnative-samples/tree/master/RNVideoChat so you can simply try to pull the latest master
I am getting "React.createContext is not a function" error while running a react-native application. I searched for 'createContent' in the code, it doesn't exist.
Any idea what may be the reason for the error.
It is an iOS build of an app that is already running on android.
Here is my package.json file:
{
"name": "newapp",
"version": "0.0.2",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest --verbose --coverage",
"test:update": "jest --verbose --coverage --updateSnapshot",
"test:watch": "jest --verbose --watch",
"coverage": "jest --verbose --coverage && xdg-open ./coverage/lcov-report/index.html",
"lint": "npx eslint --fix ./src/*"
},
"dependencies": {
"apollo-boost": "0.1.17",
"axios": "^0.18.0",
"babel": "^6.23.0",
"buffer": "5.1.0",
"cross-fetch": "^3.0.0",
"enzyme": "^3.3.0",
"graphql": "0.13.2",
"graphql-tag": "2.10.0",
"jasmine-react-helpers": "^0.2.2",
"lodash": "4.17.5",
"moment": "2.21.0",
"query-string": "^6.1.0",
"react": "16.2.0",
"react-addons-test-utils": "^15.6.2",
"react-apollo": "2.2.4",
"react-dom": "^16.4.0",
"react-native": "0.51.0",
"react-native-elements": "0.19.0",
"react-native-fabric": "^0.5.1",
"react-native-htmlview": "^0.12.1",
"react-native-link-preview": "^1.3.5",
"react-native-login": "^0.0.1-alpha.2",
"react-native-login-keycloak": "^1.0.2",
"react-native-onesignal": "3.2.6",
"react-native-push-notification": "https://github.com/Dhanraj-bidchat/react-native-push-notification.git",
"react-native-sleek-loading-indicator": "^0.1.3",
"react-native-spinkit": "^1.1.1",
"react-native-svg": "6.2.2",
"react-native-swipe-cards": "^0.1.1",
"react-native-swiper": "1.5.13",
"react-native-vector-icons": "4.5.0",
"react-navigation": "1.5.6",
"react-redux": "5.0.7",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-persist": "5.9.1",
"redux-thunk": "^2.2.0",
"victory-native": "0.17.2",
"whatwg-fetch": "2.0.4"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"babel-jest": "^22.4.4",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-preset-env": "^1.7.0",
"babel-preset-react-native": "4.0.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.3.4",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jest": "^21.17.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-only-warn": "^1.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-react": "^7.9.1",
"eslint-plugin-standard": "^3.1.0",
"jest": "^23.5.0",
"jest-resolve": "^23.0.0",
"jest-serializer-enzyme": "^1.0.0",
"react-native-mock-render": "^0.0.26",
"react-test-renderer": "^16.3.2",
"redux-mock-store": "^1.5.1",
"sinon": "^5.0.10"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"./jest-setup.js"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"modulePaths": [
"<rootDir>/src",
"<rootDir>/node_modules"
],
"transform": {
"^.+\\.js$": "babel-jest",
"^.+\\.jsx?$": "babel-jest"
},
"transformIgnorePatterns": [
"node_modules/(?!(react-native-safe-area-view|react-navigation|react-native-htmlview|react-native-fabric|react-native-login|react-native-elements|react-native-vector-icons|react-native-spinkit|victory-pie|victory-chart|victory-core|react-native-svg|react-native|redux-persist|victory-native|react-native-swipe-cards|react-native-swiper)/)"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/assetsTransformer.js",
"\\.(css|less)$": "<rootDir>/assetsTransformer.js"
}
}
}
In your package react and react-dom are not having the same version which is why you get the error. react-dom#16.4.0 will want to have access to React.createContext but react#16.2.0 won't have it.
In order make it work run the following command:
yarn upgrade react#16.4.0
Or if you are using NPM:
npm install react#16.4.0
If this is happening using react 18 or Next JS 13. You are probably trying to use a client component functionalities in a server component. By default all components are treated as server components unless you explicitly specify.
To solve this and add the "use client" directive at the top of the file (before any imports). Here is more details on When to use Server vs. Client Components?
Try upgrading React to React to 16.4.1
Using npm I solved it by upgrading to 16.4.1:
npm i react#16.4.1
Adding #emotion/react resulted in a similar error TypeError: React.createContext is not a function. The error disappeared after I removed #emotion/react and downgraded #emotion/styled from 11 to 10.
run
npm install react#latest
and
npm install react-dom#latest
fixed my error with this update.
If npm i react#latest react-dom#latest doesn't work try doing npm update , it will update all packages.
I have an AngularJS project written in TypeScript with PhpStorm.
When compiling with Webpack, I get the following error :
Error:(42, 43) TS2694:Namespace 'angular' has no exported member 'angularFileUpload'.
So there is a problem somewhere. But what bugs me is that PhpStorm is still able to resolve the type and to open the file defining it while complaining that the type cannot be resolved :
Here's an animated gif showing the behavior:
I have the same problem with another library.
In fact, it seems that typings trying to extend the ng namespace are overridden by something later on, and I don't find where.
I have included #types/ng-file-upload and defined the types root in my tsconfig like shown in the animated gif.
Thanks in advance for any advise you could give me.
EDIT :
Here's the content of my package.json file:
{
"name": "...",
"version": "0.0.1",
"description": "...",
"repository": {
...
},
"scripts": {
"gulp": "gulp build --theme=default",
"gulp:prod": "gulp build --theme=default --env=prod",
"gulp:watch": "gulp build --theme=default --watch",
"gulp:watch:prod": "gulp --theme=default --watch --env=prod",
"webpack:native:watch": "webpack --config build/webpack/config/root.config.ts --env.app=native --env.target=julien-localhost --watch",
"webpack:native:prod": "webpack --config build/webpack/config/root.config.ts --env.app=native --env.target=production --env.env=prod",
"webpack:angularjs/admin:watch": "webpack --config build/webpack/config/root.config.ts --env.app=angularjs/admin --env.target=julien-localhost --watch",
"webpack:angularjs/admin:prod": "webpack --config build/webpack/config/root.config.ts --env.app=angularjs/admin --env.target=production --env.env=prod"
},
"dependencies": {
"angular": "^1.6.9",
"angular-animate": "^1.6.9",
"angular-aria": "^1.6.9",
"angular-clipboard": "~1.6.2",
"angular-local-storage": "~0.7.1",
"angular-material": "^1.1.9",
"angular-messages": "^1.6.9",
"angular-moment-picker": "^0.10.2",
"angular-resource": "^1.6.9",
"angular-sanitize": "^1.6.9",
"angular-translate": "~2.17.0",
"angular-ui-notification": "^0.3.6",
"angular-ui-router.statehelper": "~1.3.1",
"bootstrap": "^4.1.3",
"font-awesome": "~4.7.0",
"inversify": "^4.13.0",
"jquery": "^3.3.1",
"jquery-backstretch": "^2.1.16",
"jquery-mousewheel": "^3.1.13",
"jquery-ui": "^1.12.1",
"lodash": "^4.17.10",
"mainloop.js": "^1.0.4",
"malihu-custom-scrollbar-plugin": "^3.1.5",
"moment": "~2.20.1",
"moment-timezone": "^0.5.14",
"ng-file-upload": "~12.2.13",
"parsleyjs": "^2.8.1",
"particles.js": "^2.0.0",
"q": "^1.5.1",
"raven-js": "^3.26.4",
"reflect-metadata": "^0.1.12",
"satellizer": "^0.15.5",
"scrollmonitor": "^1.2.4",
"toastr": "^2.1.4"
},
"devDependencies": {
"#fortawesome/fontawesome-free": "^5.3.1",
"#types/angular": "~1.6.43",
"#types/angular-mocks": "^1.5.11",
"#types/angular-route": "^1.3.4",
"#types/angular-ui-notification": "0.0.4",
"#types/angular-ui-router": "^1.1.40",
"#types/es6-promise": "^3.3.0",
"#types/jquery": "^3.3.6",
"#types/lodash": "^4.14.104",
"#types/modernizr": "^3.5.2",
"#types/ng-file-upload": "~12.2.2",
"#types/node": "^9.6.34",
"#types/q": "^1.5.1",
"#types/reflect-metadata": "^0.1.0",
"#types/source-map": "~0.5.7",
"#types/uglify-js": "^2.6.30",
"#types/webpack-env": "^1.13.6",
"#uirouter/angularjs": "^1.0.15",
"awesome-typescript-loader": "^3.4.1",
"browser-sync": "~2.23.6",
"browser-sync-webpack-plugin": "^2.0.1",
"chalk": "^2.3.1",
"circular-dependency-plugin": "^4.4.0",
"clone": "2.1.2",
"copy-webpack-plugin": "~4.4.1",
"force-case-sensitivity-webpack-plugin": "^0.2.1",
"gulp-angular-embed-templates": "^2.3.0",
"gulp-autoprefixer": "^5.0.0",
"gulp-compass": "^2.1.0",
"gulp-ng-annotate": "^2.1.0",
"gulp-yaml-packages": "~1.0.15",
"html-webpack-plugin": "~2.30.1",
"loader-utils": "^1.1.0",
"ngtemplate-loader": "~2.0.1",
"node-neat": "^2.0.0-beta.0",
"raw-loader": "0.5.1",
"ts-loader": "~3.5.0",
"ts-node": "~5.0.0",
"tslib": "^1.9.0",
"tslint": "~5.9.1",
"tslint-loader": "~3.5.3",
"typescript": "^2.9.2",
"url-loader": "0.6.2",
"webpack": "^3.11.0",
"webpack-merge": "~4.1.1",
"webpack-strip-block": "github:jballant/webpack-strip-block"
}
}
I've found the problem...
My tsconfig.json file contains:
{
"compilerOptions": {
[...]
"types": ["reflect-metadata", "webpack-env"]
}
}
And that's the problem, this limits what typings are included by the compiler to the ones defined in the option :
https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types
That's one more check you need to make if you're in the same situation.
If that can help someone.