-
Notifications
You must be signed in to change notification settings - Fork 12k
Cannot find module './models/config' #1873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just updated to the git repo and im getting the same error. |
I have a number of ng2 apps on my system. I took the node_modules folder for an app I updated yesterday and it worked! |
Bumping global CLI allowed me to get past this as well. |
The change suggested by @zackarychapple worked for me. |
@zackarychapple Hi mate what do you mean by bumping? Not sure what you mean lol... I am stuck on the same problem. |
For me the problem was that NVM wasn't using the right version of Node. I had installed |
I think this is related to some other problems that seem to go away, or not, based on Node versions. I made issue #1918 to look for a clarification of the versions. In the @jasonswett scenario, i suspect it would have worked for some Node 4.x.x, but not for 4.0.0. When some people say 4.x.x or 6.x.x they mean the most recent .x.x, and things usually work in those cases. When other people say those things they mean any .x.x, and I generally would not recommend anyone use any 4.0.0 or 6.0.0 for anything, you need to go up a few minor versions to pick up all the stuff that was broken in a .0 release and got fixed later. |
@kylecordes I am stuck still getting the same errors as posted above. I am using node 6.5.0 and have installed webpack version globally. I am running out of ideas... |
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)MacbookPRO / El Capitan $ node --version
v6.5.0
$ npm --version
3.10.3
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64 Repro steps. Was this an app that wasn't created using the CLI? What change did youdo on your code? etc. $ ng build my_project
$ cd my_project
$ ng build The log given by the failure. Normally this include a stack trace and somemore information. This issue seems to be related to issue #1887 It has been suggested that upgrading to node 6.5.0 might solve the problem. Unfortunately, as shown by the logs below, this is not the case: $ node --version
v6.5.0
$ npm --version
3.10.3
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64
$ ng build
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
1019ms building modules
1ms sealing
0ms optimizing
1ms basic module optimization
1ms module optimization
0ms advanced module optimization
2ms basic chunk optimization
1ms chunk optimization
0ms advanced chunk optimization
0ms module and chunk tree optimization
3ms module reviving
0ms module order optimization
0ms module id optimization
1ms chunk reviving
0ms chunk order optimization
1ms chunk id optimization
2ms hashing
0ms module assets processing
6ms chunk assets processing
1ms additional chunk assets processing
0ms recording
1ms additional asset processing
76ms chunk asset optimization
193ms asset optimization
4ms emitting
Hash: 8633515b4611dd25238a
Version: webpack 2.1.0-beta.21
Time: 1329ms
Asset Size Chunks Chunk Names
main.bundle.js 19.3 kB 0, 2 [emitted] main
styles.bundle.js 13 kB 1, 2 [emitted] styles
inline.js 5.53 kB 2 [emitted] inline
main.map 15.4 kB 0, 2 [emitted] main
styles.map 17.9 kB 1, 2 [emitted] styles
inline.map 5.59 kB 2 [emitted] inline
index.html 481 bytes [emitted]
assets/.npmignore 0 bytes [emitted]
chunk {0} main.bundle.js, main.map (main) 13.8 kB {1} [initial] [rendered]
chunk {1} styles.bundle.js, styles.map (styles) 12.7 kB {2} [initial] [rendered]
chunk {2} inline.js, inline.map (inline) 0 bytes [entry] [rendered]
ERROR in ./src/main.ts
Module not found: Error: Can't resolve '@angular/platform-browser-dynamic' in '/Users/silveir/Projects/studies/ng2_router/src'
@ ./src/main.ts 2:0-75
@ multi main
.... many more errors of this nature Mention any other details that might be useful.Ive tried the steps above with many different typescript versions |
check your the |
I was able to solve this problem with the following configuration: Upgrade imy tools node --version
v6.5.0
$ npm --version
3.10.3
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64
$ npm list -g
/usr/local/lib
├─┬ [email protected]
│ ├── @angular-cli/[email protected]
...
├── [email protected]
.... Changed "typescript": "^2.0.0"
|
I'm seeing the same problem. I'm using docker, but my Dockerfile is simply
Then I'm running in my built container |
Same problem here
|
I tried everything above and I'm still getting the same error |
same lol |
+1 |
Same here :( |
I had the same issue, so I updated angular cli webpack like the tutorial provided in the readme https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md . Snippet of the readme: Global package:
Local project package:
(I deleted the whole node_modules folder) Project files: You will need to run Carefully read the diffs for each code file, and either accept the changes or incorporate them manually after ng init finishes. Maybe you need to edit the package.json file if angular isn't finding any names like 'Array' or so. |
FYI, I'm using v5 (5.12.0), and I was able to side-step the
cc @ericjim |
@chalin might it just be that your global version is angular-cli@latest but your project version is angular-cli@webpack |
@Renader - I don't think I had the cli installed globally at the time, but maybe I did. Thanks. |
FWIW: I hit this same issue last night.
fresh install.
Tried uninstalling and reinstalling webpack. Tried uninstalling webpack, uninstalling angular-cli, then reinstalling angular-cli, then reinstalling webpack. No combination works. cc @hansl |
If you're experiencing the issue, be sure you're using the version of Node you think you're using. You can have 6.5.0 installed and still be using 4.0.0, for example. I always have to run |
@jasonswett no dice. Confirmed to be using Node 6.5.0. Same error |
I'm getting this too, strange it wasn't happening last night and I don't believe I've changed anything. |
I fixed this error. Turns out that angular-cli was installed globally in two locations (still don't know how I managed to do that). Once in the nodeJS directory and once in the users/AppData/Roaming/npm. What happened is that in the command-line, angular-cli was still pointing to the webpack.2 install instead of the webpack.8. Once I figured this out and properly installed the webpack.8 and made sure my package.json included the webpack.8 version, the error was resolved. So: And put the angular-cli 1.0.0-beta.11-webpack.8 in your package.json |
@cybey Yes! Uninstalling and reinstalling it again with precise version worked... Used node 6.5.0. |
Weirdest thing: I get the error when I command ng serve, but when I command npm start, it executes ng serve and it works perfectly. |
In my case, I found a |
These issues seem related to some odd situations where several Does anyone still have does problem with If so, do these comments help? @Blesh's in #1873 (comment) or @cybey's #1873 (comment) |
if you run npm start it will work if you have ng serve defined as start in the package.json. |
@filipesilva beta.15 works. |
Got the same issue. Cannot use |
Hey @JanStureNielsen , I did
then try to |
Got the exact same problems... Fresh Windows install. Node: v6.8.0 No matter what I try everything fails and as result I receive the same error over and over again. |
@theunreal @Celaniry if you still have problems please open a new issue with detailed description. I don't think you can have the same issue as the original comments because it was related with running off latest master. |
I was getting this error with the current latest npm angular-cli package. However it turns out I had a left over npm / nodejs within my ubuntu distribtuion. I fixed the issue by completely removing node and npm from every location. I then reinstalled node via nvm. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Running off the latest master I am getting the below error. @filipesilva @hansl
f9df8bb1730a5fe28e825db591a036157af34496
is the last commit that works for me.Here is my current angular-cli config. From what I can tell matches the current one on master.
The text was updated successfully, but these errors were encountered: