Platform: unable to build example app under windows 10

Created on 18 Sep 2017  路  2Comments  路  Source: ngrx/platform

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

I ran the npm run build and npm run cli -- serve and got the following error.

ERROR in ./dist/effects/src/effects_feature_module.js
Module not found: Error: Can't resolve '@ngrx/store' in 'C:\src\platform\dist\effects\src'
resolve '@ngrx/store' in 'C:\src\platform\dist\effects\src'
  Parsed request is a module
  using description file: C:\src\platform\dist\effects\package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\src\platform\dist\effects\package.json (relative path: ./src)
    resolve as module
      C:\src\platform\dist\effects\src\node_modules doesn't exist or is not a directory
      C:\src\platform\dist\effects\node_modules doesn't exist or is not a directory
      C:\src\platform\dist\node_modules doesn't exist or is not a directory
      C:\src\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\src\platform\node_modules
        using description file: C:\src\platform\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\src\platform\package.json (relative path: ./node_modules)
          using description file: C:\src\platform\package.json (relative path: ./node_modules/@ngrx/store)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store.js doesn't exist
            as directory
              C:\src\platform\node_modules\@ngrx\store doesn't exist
      looking for modules in C:\src\platform\node_modules
        using description file: C:\src\platform\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\src\platform\package.json (relative path: ./node_modules)
          using description file: C:\src\platform\package.json (relative path: ./node_modules/@ngrx/store)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\node_modules\@ngrx\store.js doesn't exist
            as directory
              C:\src\platform\node_modules\@ngrx\store doesn't exist
      looking for modules in C:\src\platform\example-app
        using description file: C:\src\platform\package.json (relative path: ./example-app)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\src\platform\package.json (relative path: ./example-app)
          using description file: C:\src\platform\package.json (relative path: ./example-app/@ngrx/store)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store.js doesn't exist
            as directory
              C:\src\platform\example-app\@ngrx\store doesn't exist
      looking for modules in C:\src\platform\example-app
        using description file: C:\src\platform\package.json (relative path: ./example-app)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\src\platform\package.json (relative path: ./example-app)
          using description file: C:\src\platform\package.json (relative path: ./example-app/@ngrx/store)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\src\platform\example-app\@ngrx\store.js doesn't exist
            as directory
              C:\src\platform\example-app\@ngrx\store doesn't exist
[C:\src\platform\dist\effects\src\node_modules]
[C:\src\platform\dist\effects\node_modules]
[C:\src\platform\dist\node_modules]
[C:\src\node_modules]
[C:\node_modules]
[C:\src\platform\node_modules\@ngrx\store]
[C:\src\platform\node_modules\@ngrx\store.ts]
[C:\src\platform\node_modules\@ngrx\store.js]
[C:\src\platform\node_modules\@ngrx\store]
[C:\src\platform\node_modules\@ngrx\store]
[C:\src\platform\node_modules\@ngrx\store.ts]
[C:\src\platform\node_modules\@ngrx\store.js]
[C:\src\platform\node_modules\@ngrx\store]
[C:\src\platform\example-app\@ngrx\store]
[C:\src\platform\example-app\@ngrx\store.ts]
[C:\src\platform\example-app\@ngrx\store.js]
[C:\src\platform\example-app\@ngrx\store]
[C:\src\platform\example-app\@ngrx\store]
[C:\src\platform\example-app\@ngrx\store.ts]
[C:\src\platform\example-app\@ngrx\store.js]
[C:\src\platform\example-app\@ngrx\store]
 @ ./dist/effects/src/effects_feature_module.js 2:0-42
 @ ./dist/effects/effects.js
 @ ./example-app/app/app.module.ts
 @ ./example-app/main.ts
 @ multi webpack-dev-server/client?http://localhost:42001 ./example-app/main.ts
...

Expected behavior:

No error at all

Minimal reproduction of the problem with instructions:

clone the repo
git checkout v4.0.5
run npm run build && npm run cli -- serve

Version of affected browser(s),operating system(s), npm, node and ngrx:

Windows 10
npm version 3.10.10
node version v6.11.1

Other information:

tried on the latest release branch.

Most helpful comment

The CI for the project is running on node 6.9.5 and using yarn as opposed to npm.
try upgrading your node to version 6.9.5 and run the following sequence. if you haven't already try using nvm to manage node versions, makes life easier (https://github.com/coreybutler/nvm-windows)

npm install -g yarn
yarn 
yarn run bootstrap -- --concurrency=1
yarn example:start

All 2 comments

The CI for the project is running on node 6.9.5 and using yarn as opposed to npm.
try upgrading your node to version 6.9.5 and run the following sequence. if you haven't already try using nvm to manage node versions, makes life easier (https://github.com/coreybutler/nvm-windows)

npm install -g yarn
yarn 
yarn run bootstrap -- --concurrency=1
yarn example:start

It worked after using newer version of node

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonroberts picture brandonroberts  路  3Comments

gperdomor picture gperdomor  路  3Comments

oxiumio picture oxiumio  路  3Comments

dollyshah-02-zz picture dollyshah-02-zz  路  3Comments

itprodavets picture itprodavets  路  3Comments