current behavior
preact build --brotli prints the following error:
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
other relevant information
My app is a standard preact-cli 'Default' (preact-cli template).
Not using the --brotli flag builds as desired/expected.
It's clear the js files are being built to .br but with no filename.
Environment Info:
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 # 2.80GHz
Binaries:
Node: 18.12.1
npm: 8.4.1
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.54)
npmPackages:
preact: ^10.11.2 => 10.11.2
preact-cli: ^3.4.1 => 3.4.1
preact-render-to-string: ^5.2.6 => 5.2.6
preact-router: ^4.1.0 => 4.1.0
Per the preact-cli documentation combined with the only walkthrough I could find on expected behavior I expected to see "... all the generated javascript files also have a .js.br files next to them."
Steps to reproduce the behavior:
preact build --brotli
See error
error
preact build --brotli
‼ WARN Could not find sw.js in C:\... Using the default service worker.
bundle.*****.esm.js ⏤ 91.3 kB
polyfills.*****.esm.js ⏤ 2.18 kB
route-REDACT.chunk.6bef3.css ⏤ 236 B
route-REDACT.chunk.*****.esm.js ⏤ 849 B
route-REDACT.chunk.*****.esm.js ⏤ 1.54 kB
route-REDACT.chunk.64635.css ⏤ 138 B
route-REDACT.chunk.*****.esm.js ⏤ 641 B
route-REDACT.chunk.*****.esm.js ⏤ 294 B
sw.js ⏤ 10.9 kB
sw-esm.js ⏤ 10.9 kB
polyfills.77b1f.js ⏤ 2.28 kB
index.html ⏤ 1.66 kB (-19 B)
200.html ⏤ 1.17 kB
bundle.ccccc.css ⏤ 5.36 kB
route-REDACT.chunk.230c8.css ⏤ 139 B
route-REDACT.chunk.*****.esm.js ⏤ 405 B
route-REDACT.chunk.f85cc.css ⏤ 571 B
bundle.bbbbb.js ⏤ 92.7 kB
route-REDACT.chunk.f4a3f.js ⏤ 412 B
route-REDACT.chunk.4a8c5.js ⏤ 1.36 kB
route-REDACT.chunk.56f91.js ⏤ 2.14 kB
route-REDACT.chunk.e7d3e.js ⏤ 1.16 kB
route-REDACT.chunk.68634.js ⏤ 293 B
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN asset size limit: The following asset(s) exceed the recommended size limit (195 KiB).
This can impact web performance.
Assets:
bundle.aaaaa.esm.js (376 KiB)
bundle.bbbbb.js (390 KiB)
‼ WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (195 KiB). This can impact web performance.
Entrypoints:
bundle (785 KiB)
bundle.ccccc.css
bundle.bbbbb.js
bundle.aaaaa.esm.js
`your text`‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN Conflict: Multiple assets emit different content to the same filename .br
‼ WARN asset size limit: The following asset(s) exceed the recommended size limit (195 KiB).
This can impact web performance.
Assets:
bundle.aaaaa.esm.js (376 KiB)
bundle.bbbbb.js (390 KiB)
‼ WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (195 KiB). This can impact web performance.
Entrypoints:
bundle (785 KiB)
bundle.ccccc.css
bundle.bbbbb.js
bundle.aaaaa.esm.js
Fix for this issue was release as preact-cli v3.4.3.
Related
I'm having a hard time deploying my app.
Using node 16.14.2 and npm 8.5.0.
My package versions are as follows:
{
"name": "tic-tac-toe",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "\^5.16.3",
"#testing-library/react": "\^12.1.4",
"#testing-library/user-event": "\^13.5.0",
"react": "\^18.0.0",
"react-dom": "\^18.0.0",
"react-scripts": "5.0.0",
"react-widgets": "\^5.8.4",
"web-vitals": "\^2.1.4"
},
I am able to get the issue simply by creating a default app (npx create-react-app my-app, adding import ComboBox from 'react-widgets/ComboBox'; to my index.js file, installing dependencies with npm install && npm install react-widgets, and running npm start.
The console output is as follows:
Failed to compile.
Module not found: Error: Can't resolve 'react-widgets/ComboBox' in '/home/twtduck/ttt/src'
assets by path static/ 1.62 MiB
asset static/js/bundle.js 1.61 MiB [emitted] (name: main) 1 related asset
asset static/js/node_modules_web-vitals_dist_web-vitals_js.chunk.js 6.91 KiB [emitted] 1 related asset
asset static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg 2.57 KiB [emitted] (auxiliary name: main)
asset index.html 1.67 KiB [emitted]
asset asset-manifest.json 546 bytes [emitted]
runtime modules 31.7 KiB 16 modules
modules by path ./node_modules/ 1.48 MiB 96 modules
modules by path ./src/ 18.1 KiB
modules by path ./src/*.css 8.82 KiB
./src/index.css 2.72 KiB [built] [code generated]
./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/index.css 1.37 KiB [built] [cod
e generated]
./src/App.css 2.72 KiB [built] [code generated]
./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./node_modules/source-map-loader/dist/cjs.js!./src/App.css 2 KiB [built] [code gen
erated]
modules by path ./src/*.js 5.71 KiB
./src/index.js 1.83 KiB [built] [code generated]
./src/App.js 2.49 KiB [built] [code generated]
./src/reportWebVitals.js 1.39 KiB [built] [code generated]
./src/logo.svg 3.61 KiB [built] [code generated]
WARNING in src/index.js
Line 7:8: 'ComboBox' is defined but never used no-unused-vars
ERROR in ./src/index.js 9:0-46
Module not found: Error: Can't resolve 'react-widgets/ComboBox' in '/home/twtduck/ttt/src'
resolve 'react-widgets/ComboBox' in '/home/twtduck/ttt/src'
Parsed request is a module
using description file: /home/twtduck/ttt/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/home/twtduck/ttt/src/node_modules doesn't exist or is not a directory
looking for modules in /home/twtduck/ttt/node_modules
existing directory /home/twtduck/ttt/node_modules/react-widgets
using description file: /home/twtduck/ttt/node_modules/react-widgets/package.json (relative path: .)
using description file: /home/twtduck/ttt/node_modules/react-widgets/package.json (relative path: ./ComboBox)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox doesn't exist
.web.mjs
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.mjs doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.mjs doesn't exist
.web.js
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.json doesn't exist
.web.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.jsx doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.jsx doesn't exist
as directory
/home/twtduck/ttt/node_modules/react-widgets/ComboBox doesn't exist
/home/twtduck/node_modules doesn't exist or is not a directory
/home/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /home/twtduck/ttt/node_modules
existing directory /home/twtduck/ttt/node_modules/react-widgets
using description file: /home/twtduck/ttt/node_modules/react-widgets/package.json (relative path: .)
using description file: /home/twtduck/ttt/node_modules/react-widgets/package.json (relative path: ./ComboBox)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox doesn't exist
.web.mjs
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.mjs doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.mjs doesn't exist
.web.js
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.json doesn't exist
.web.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.web.jsx doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/twtduck/ttt/node_modules/react-widgets/ComboBox.jsx doesn't exist
as directory
/home/twtduck/ttt/node_modules/react-widgets/ComboBox doesn't exist
The strange part about this is that it works fine on Windows, but not Ubuntu. I've tried re-installing the server from a fresh image, to no success. I've also tried downgrading to react 17, which also doesn't work. Suggestions?
woltjer
can you try with this?
import { ComboBox } from 'react-widgets'
with this way you will get a part of react-widgets
that is similar to:
import { useState, useContex } from 'react'
I am trying to deploy a nodejs app I have via
git push heroku master
The build is failing due to timeout and here is the build log
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 10.x...
Downloading and installing node 10.15.3...
Using default npm version: 6.4.1
-----> Restoring cache
Cached directories were not restored due to a change in version of node, npm, yarn or stack
Module installation may take longer for this build
-----> Installing dependencies
Installing node modules (package.json + package-lock)
> node-expat#2.3.17 install /tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/node-expat
> node-gyp rebuild
make: Entering directory '/tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/node-expat/build'
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
../deps/libexpat/lib/xmlparse.c: In function ‘gather_time_entropy’:
../deps/libexpat/lib/xmlparse.c:780:7: warning: variable ‘gettimeofday_res’ set but not used [-Wunused-but-set-variable]
int gettimeofday_res;
^
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
AR(target) Release/obj.target/deps/libexpat/libexpat.a
COPY Release/libexpat.a
CXX(target) Release/obj.target/node_expat/node-expat.o
../node-expat.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Parser::Parse(Nan::NAN_METHOD_ARGS_TYPE)’:
../node-expat.cc:103:47: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> obj = info[0]->ToObject();
^
In file included from /app/.node-gyp/10.15.3/include/node/node.h:63:0,
from ../node_modules/nan/nan.h:52,
from ../node-expat.cc:1:
/app/.node-gyp/10.15.3/include/node/v8.h:10046:15: note: declared here
Local<Object> Value::ToObject() const {
^
../node-expat.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE Parser::SetUnknownEncoding(Nan::NAN_METHOD_ARGS_TYPE)’:
../node-expat.cc:470:59: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
parser->xmlEncodingInfo->map[i] = m->Int32Value();
^
In file included from /app/.node-gyp/10.15.3/include/node/v8.h:26:0,
from /app/.node-gyp/10.15.3/include/node/node.h:63,
from ../node_modules/nan/nan.h:52,
from ../node-expat.cc:1:
/app/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^
/app/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
SOLINK_MODULE(target) Release/obj.target/node_expat.node
COPY Release/node_expat.node
make: Leaving directory '/tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/node-expat/build'
> iconv#2.3.1 install /tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/iconv
> node-gyp rebuild
make: Entering directory '/tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/iconv/build'
CXX(target) Release/obj.target/iconv/src/binding.o
CC(target) Release/obj.target/iconv/deps/libiconv/lib/iconv.o
CC(target) Release/obj.target/iconv/support/localcharset.o
SOLINK_MODULE(target) Release/obj.target/iconv.node
COPY Release/iconv.node
make: Leaving directory '/tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/iconv/build'
> execSync#1.0.2 install /tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/node_modules/execSync
> node install.js
[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]
Native code compile failed!!
added 760 packages from 579 contributors and audited 3610 packages in 38.646s
found 111 vulnerabilities (46 low, 49 moderate, 16 high)
run `npm audit fix` to fix them, or `npm audit` for details
-----> Build
Running build
> udemy-nodejs-angular2#1.0.0 build /tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea
> del-cli public/js/app && webpack --config webpack.config.dev.js --progress --profile --watch
0% compiling
Webpack is watching the files…
10% building modules 0/1 modules 1 active ...dc95dbb7c74ca4abea/assets/app/main.ts
[at-loader] Using typescript#2.6.2 from typescript and "tsconfig.json" from /tmp/build_c3cb8f26de145fdc95dbb7c74ca4abea/tsconfig.json.
18812ms building modules
77ms sealing
0ms optimizing
0ms basic module optimization
66ms module optimization
27ms advanced module optimization
0ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1ms module and chunk tree optimization
48ms module reviving
6ms module order optimization
9ms module id optimization
10ms chunk reviving
1ms chunk order optimization
45ms chunk id optimization
116ms hashing
1ms module assets processing
1746ms chunk assets processing
6ms additional chunk assets processing
0ms recording
0ms additional asset processing
1ms chunk asset optimization
494ms asset optimization
206ms emitting
Hash: bdcd2d9b22529d57e9ea
Version: webpack 2.7.0
Time: 21715ms
Asset Size Chunks Chunk Names
0.chunk.js 672 kB 0 [emitted] [big]
1.chunk.js 45.2 kB 1 [emitted]
bundle.js 29.8 MB 2 [emitted] [big] app
[0] ./~/#angular/core/esm5/core.js 542 kB {2} [built]
[] -> factory:568ms building:8004ms dependencies:14ms = 8586ms
[4] ./~/tslib/tslib.es6.js 8.03 kB {2} [built]
[] -> factory:1256ms building:1025ms = 2281ms
[46] ./~/#angular/platform-browser/esm5/platform-browser.js 159 kB {2} [built]
[] -> factory:570ms building:4258ms dependencies:5ms = 4833ms
[785] ./~/#angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js 24.9 kB {2} [built]
[] -> factory:96ms building:89ms dependencies:464ms = 649ms
[786] ./assets/app/app.module.ts 4.19 kB {2} [built]
[] -> factory:11ms building:71ms = 82ms
[787] ./assets/app/polyfills.ts 163 bytes {2} [built]
[] -> factory:9ms building:9ms = 18ms
[788] ./~/hammerjs/hammer.js 73.8 kB {2} [built]
[] -> factory:95ms building:643ms = 738ms
[820] ./~/#angular/platform-browser/esm5/animations.js 28 kB {2} [built]
[] -> factory:571ms building:292ms dependencies:499ms = 1362ms
[821] ./assets/app/app.component.ts 1.58 kB {2} [built]
[] -> factory:27ms building:112ms dependencies:431ms = 570ms
[822] ./assets/app/app.routing.ts 3.79 kB {2} [built]
[] -> factory:28ms building:176ms dependencies:12ms = 216ms
[823] ./assets/app/errors/error.component.ts 2.12 kB {2} [built]
[] -> factory:32ms building:343ms dependencies:195ms = 570ms
[825] ./assets/app/header.component.ts 1.53 kB {2} [built]
[] -> factory:28ms building:129ms dependencies:413ms = 570ms
[826] ./assets/app/main.ts 338 bytes {2} [built]
factory:30ms building:7552ms = 7582ms
[830] ./assets/app/messages/message.module.ts 1.78 kB {2} [built]
[] -> factory:34ms building:372ms dependencies:1123ms = 1529ms
[832] ./assets/app/setup/job.module.ts 4.54 kB {2} [built]
[] -> factory:36ms building:471ms dependencies:1277ms = 1784ms
+ 1707 hidden modules
-----> Timed out running buildpack Node.js
! Timed out compiling app (60 minutes)
! See https://devcenter.heroku.com/articles/slug-compiler#time-limit
I see that there is a statement that says Module installation may take longer for this build but unfortunately it is timing out. The frustrating part here is that it used to work and I'm not sure why it isn't now. Is there any way to increase the timeout limit or solve this issue in another way?
This is probably due to the webpack build taking time due to high memory usage. You can try to tweak the memory allowed for the node process by passing NODE_OPTIONS="--max_old_space_size=2560". The default size is 2.5GB and you can try increasing it to a suitable value. Might help!
I have my website on AngularJs and it was working just fine before we updated the NPM clean. Whenever we tried to build the project with 'Grunt Build' it gets stuck after processing the images part.
Reinstalled NPM previous version
Resetup complete environment
Deleted cache and everything
$ grunt build -v
Initializing
Command-line options: --verbose, --gruntfile=C:\Users\YouStable\Documents\newyst\Gruntfile.js
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
=============================================================================
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Registering "grunt-autoprefixer" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-autoprefixer\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-autoprefixer\package.json...OK
Loading "autoprefixer.js" tasks...OK
+ autoprefixer
Registering "grunt-filerev-replace" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-filerev-replace\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-filerev-replace\package.json...OK
Loading "filerev_replace.js" tasks...OK
+ filerev_replace
Registering "grunt-concurrent" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-concurrent\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-concurrent\package.json...OK
Loading "concurrent.js" tasks...OK
+ concurrent
Registering "grunt-contrib-clean" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-clean\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean
Registering "grunt-contrib-concat" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-concat\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-concat\package.json...OK
Loading "concat.js" tasks...OK
+ concat
Registering "grunt-contrib-connect" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-connect\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-connect\package.json...OK
Loading "connect.js" tasks...OK
+ connect
Registering "grunt-contrib-copy" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-copy\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-copy\package.json...OK
Loading "copy.js" tasks...OK
+ copy
Registering "grunt-contrib-cssmin" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-cssmin\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-cssmin\package.json...OK
Loading "cssmin.js" tasks...OK
+ cssmin
Registering "grunt-contrib-htmlmin" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-htmlmin\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-htmlmin\package.json...OK
Loading "htmlmin.js" tasks...OK
+ htmlmin
Registering "grunt-contrib-imagemin" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-imagemin\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-imagemin\package.json...OK
Loading "imagemin.js" tasks...OK
+ imagemin
Registering "grunt-contrib-jshint" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-jshint\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-jshint\package.json...OK
Loading "jshint.js" tasks...OK
+ jshint
Registering "grunt-contrib-uglify" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-uglify\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-uglify\package.json...OK
Loading "uglify.js" tasks...OK
+ uglify
Registering "grunt-contrib-watch" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-watch\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-contrib-watch\package.json...OK
Loading "watch.js" tasks...OK
+ watch
Registering "grunt-filerev" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-filerev\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-filerev\package.json...OK
Loading "filerev.js" tasks...OK
+ filerev
Registering "grunt-google-cdn" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-google-cdn\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-google-cdn\package.json...OK
Loading "cdnify.js" tasks...OK
+ cdnify
Registering "grunt-newer" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-newer\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-newer\package.json...OK
Loading "newer.js" tasks...OK
+ any-newer, newer, newer-clean, newer-postrun
Registering "grunt-ng-annotate" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-ng-annotate\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-ng-annotate\package.json...OK
Loading "ng-annotate.js" tasks...OK
+ ngAnnotate
Registering "grunt-svgmin" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-svgmin\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-svgmin\package.json...OK
Loading "svgmin.js" tasks...OK
+ svgmin
Registering "grunt-usemin" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-usemin\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-usemin\package.json...OK
Loading "usemin.js" tasks...OK
+ usemin, useminPrepare
Registering "grunt-wiredep" local Npm module tasks.
Reading C:\Users\YouStable\Documents\newyst\node_modules\grunt-wiredep\package.json...OK
Parsing C:\Users\YouStable\Documents\newyst\node_modules\grunt-wiredep\package.json...OK
Loading "wiredep.js" tasks...OK
+ wiredep
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
+ build, default, serve, server, test
Running tasks: svgmin
Running "svgmin" task
Running "svgmin:dist" (svgmin) task
Verifying property svgmin.dist exists in config...OK
Files: app/images/1-high.svg -> dist/images/1-high.svg
Files: app/images/9-high.svg -> dist/images/9-high.svg
Files: app/images/dreamhost.svg -> dist/images/dreamhost.svg
Files: app/images/icons/cd-arrow.svg -> dist/images/icons/cd-arrow.svg
Files: app/images/icons/cloud.svg -> dist/images/icons/cloud.svg
Files: app/images/icons/contract.svg -> dist/images/icons/contract.svg
Files: app/images/icons/curriculum.svg -> dist/images/icons/curriculum.svg
Files: app/images/icons/http.svg -> dist/images/icons/http.svg
Files: app/images/icons/piggy-bank.svg -> dist/images/icons/piggy-bank.svg
Files: app/images/icons/sms_interact.svg -> dist/images/icons/sms_interact.svg
Files: app/images/icons/speaker.svg -> dist/images/icons/speaker.svg
Files: app/images/icons/website.svg -> dist/images/icons/website.svg
Files: app/images/lowa.svg -> dist/images/lowa.svg
Files: app/images/svgs/boy.svg -> dist/images/svgs/boy.svg
Files: app/images/svgs/call.svg -> dist/images/svgs/call.svg
Files: app/images/svgs/cancel.svg -> dist/images/svgs/cancel.svg
Files: app/images/svgs/chat.svg -> dist/images/svgs/chat.svg
Files: app/images/svgs/chat1.svg -> dist/images/svgs/chat1.svg
Files: app/images/svgs/check.svg -> dist/images/svgs/check.svg
Files: app/images/svgs/Digital_Marketing_Image.svg -> dist/images/svgs/Digital_Marketing_Image.svg
Files: app/images/svgs/drupal.svg -> dist/images/svgs/drupal.svg
Files: app/images/svgs/email.svg -> dist/images/svgs/email.svg
Files: app/images/svgs/ink.svg -> dist/images/svgs/ink.svg
Files: app/images/svgs/joomla.svg -> dist/images/svgs/joomla.svg
Files: app/images/svgs/like.svg -> dist/images/svgs/like.svg
Files: app/images/svgs/magento.svg -> dist/images/svgs/magento.svg
Files: app/images/svgs/man.svg -> dist/images/svgs/man.svg
Files: app/images/svgs/phone-call.svg -> dist/images/svgs/phone-call.svg
Files: app/images/svgs/picture.svg -> dist/images/svgs/picture.svg
Files: app/images/svgs/shopping-cart.svg -> dist/images/svgs/shopping-cart.svg
Files: app/images/svgs/wordpress.svg -> dist/images/svgs/wordpress.svg
Options: (none)
Reading app/images/1-high.svg...OK
√ app/images/1-high.svg (saved 7 B 0%)
Writing dist/images/1-high.svg...OK
Reading app/images/9-high.svg...OK
√ app/images/9-high.svg (saved 76.48 kB 25%)
Writing dist/images/9-high.svg...OK
Reading app/images/dreamhost.svg...OK
√ app/images/dreamhost.svg (saved 147 B 6%)
Writing dist/images/dreamhost.svg...OK
Reading app/images/icons/cd-arrow.svg...OK
√ app/images/icons/cd-arrow.svg (saved 156 B 42%)
Writing dist/images/icons/cd-arrow.svg...OK
Reading app/images/icons/cloud.svg...OK
√ app/images/icons/cloud.svg (saved 2.97 kB 47%)
Writing dist/images/icons/cloud.svg...OK
Reading app/images/icons/contract.svg...OK
√ app/images/icons/contract.svg (saved 900 B 35%)
Writing dist/images/icons/contract.svg...OK
Reading app/images/icons/curriculum.svg...OK
√ app/images/icons/curriculum.svg (saved 887 B 27%)
Writing dist/images/icons/curriculum.svg...OK
Reading app/images/icons/http.svg...OK
√ app/images/icons/http.svg (saved 1.18 kB 29%)
Writing dist/images/icons/http.svg...OK
Reading app/images/icons/piggy-bank.svg...OK
√ app/images/icons/piggy-bank.svg (saved 1.07 kB 17%)
Writing dist/images/icons/piggy-bank.svg...OK
Reading app/images/icons/sms_interact.svg...OK
√ app/images/icons/sms_interact.svg (saved 9.31 kB 55%)
Writing dist/images/icons/sms_interact.svg...OK
Reading app/images/icons/speaker.svg...OK
√ app/images/icons/speaker.svg (saved 1.04 kB 29%)
Writing dist/images/icons/speaker.svg...OK
Reading app/images/icons/website.svg...OK
√ app/images/icons/website.svg (saved 1.3 kB 27%)
Writing dist/images/icons/website.svg...OK
Reading app/images/lowa.svg...OK
√ app/images/lowa.svg (saved 47.01 kB 27%)
Writing dist/images/lowa.svg...OK
Reading app/images/svgs/boy.svg...OK
√ app/images/svgs/boy.svg (saved 1.47 kB 22%)
Writing dist/images/svgs/boy.svg...OK
Reading app/images/svgs/call.svg...OK
√ app/images/svgs/call.svg (saved 614 B 22%)
Writing dist/images/svgs/call.svg...OK
Reading app/images/svgs/cancel.svg...OK
√ app/images/svgs/cancel.svg (saved 233 B 50%)
Writing dist/images/svgs/cancel.svg...OK
Reading app/images/svgs/chat.svg...OK
√ app/images/svgs/chat.svg (saved 286 B 19%)
Writing dist/images/svgs/chat.svg...OK
Reading app/images/svgs/chat1.svg...OK
√ app/images/svgs/chat1.svg (saved 283 B 19%)
Writing dist/images/svgs/chat1.svg...OK
Reading app/images/svgs/check.svg...OK
√ app/images/svgs/check.svg (saved 182 B 50%)
Writing dist/images/svgs/check.svg...OK
Reading app/images/svgs/Digital_Marketing_Image.svg...OK
√ app/images/svgs/Digital_Marketing_Image.svg (saved 24.02 kB 23%)
Writing dist/images/svgs/Digital_Marketing_Image.svg...OK
Reading app/images/svgs/drupal.svg...OK
√ app/images/svgs/drupal.svg (saved 22.07 kB 88%)
Writing dist/images/svgs/drupal.svg...OK
Reading app/images/svgs/email.svg...OK
√ app/images/svgs/email.svg (saved 1.24 kB 22%)
Writing dist/images/svgs/email.svg...OK
Reading app/images/svgs/ink.svg...OK
√ app/images/svgs/ink.svg (saved 3.31 kB 41%)
Writing dist/images/svgs/ink.svg...OK
Reading app/images/svgs/joomla.svg...OK
√ app/images/svgs/joomla.svg (saved 1.29 kB 44%)
Writing dist/images/svgs/joomla.svg...OK
Reading app/images/svgs/like.svg...OK
√ app/images/svgs/like.svg (saved 382 B 23%)
Writing dist/images/svgs/like.svg...OK
Reading app/images/svgs/magento.svg...OK
√ app/images/svgs/magento.svg (saved 435 B 40%)
Writing dist/images/svgs/magento.svg...OK
Reading app/images/svgs/man.svg...OK
√ app/images/svgs/man.svg (saved 1.5 kB 23%)
Writing dist/images/svgs/man.svg...OK
Reading app/images/svgs/phone-call.svg...OK
√ app/images/svgs/phone-call.svg (saved 741 B 26%)
Writing dist/images/svgs/phone-call.svg...OK
Reading app/images/svgs/picture.svg...OK
√ app/images/svgs/picture.svg (saved 450 B 24%)
Writing dist/images/svgs/picture.svg...OK
Reading app/images/svgs/shopping-cart.svg...OK
√ app/images/svgs/shopping-cart.svg (saved 663 B 39%)
Writing dist/images/svgs/shopping-cart.svg...OK
Reading app/images/svgs/wordpress.svg...OK
√ app/images/svgs/wordpress.svg (saved 715 B 35%)
Writing dist/images/svgs/wordpress.svg...OK
Total saved: 202.33 kB
Done.
Execution Time (2019-03-26 10:12:18 UTC+5:30)
loading tasks 13ms █ 1%
svgmin:dist 2s ███████████████████████████████████████████████ 99%
Total 2s
Its still working fine on other device with old setup but new setup doesn't work at all. Please check and review.
What is the node version are you using? There might be compatibility issues.
You haven't pasted the what error you got.! So, will give you the general troubleshooting of the issue.
For troubleshooting whenever you are facing kind of wired issue. Just go ahead and clean the cache by using npm cache clean.
I downloaded one Angular project from the Internet with an Angular select component.
Here is the original example:
https://material.angular.io/components/select/overview#resetting-the-select-value
They have a demo on the following link:
https://stackblitz.com/angular/qodvbqymxae
I downloaded that demo to my computer, but when doing:
$ ng serve
I get the error:
ERROR in Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
at Object.resolveEntryModuleFromMain (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\entry_resolver.js:131:11)
at Promise.resolve.then.then (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js:239:54)
at process._tickCallback (internal/process/next_tick.js:109:7)
as you can see on the following full output:
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-01-07T09:15:56.348Z
Hash: 93425b9cdaae6fb908b2
Time: 10331ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 2.93 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 154 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 854 kB [initial] [rendered]
ERROR in Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
at Object.resolveEntryModuleFromMain (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\entry_resolver.js:131:11)
at Promise.resolve.then.then (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js:239:54)
at process._tickCallback (internal/process/next_tick.js:109:7)
webpack: Failed to compile.
webpack: Compiling...
Date: 2018-01-07T09:15:58.101Z
Hash: c2a123371dfcb5513a4e
Time: 884ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry]
chunk {main} main.bundle.js (main) 2.93 kB [initial]
chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial]
chunk {styles} styles.bundle.js (styles) 154 kB [initial]
chunk {vendor} vendor.bundle.js (vendor) 854 kB [initial]
ERROR in Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
at Object.resolveEntryModuleFromMain (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\entry_resolver.js:131:11)
at Promise.resolve.then.then (D:\_System\Hatuey\Desktop\angular-material-select\node_modules\#ngtools\webpack\src\angular_compiler_plugin.js:239:54)
at process._tickCallback (internal/process/next_tick.js:109:7)
webpack: Failed to compile.
On the README.md file provided by: stackblitz.com (when export) they say:
This project was generated with Angular CLI version 1.2.1.
On my local computer I get the following:
$ ng version
...
Angular CLI: 1.5.4
Node: 6.11.2
OS: win32 x64
Angular: 5.1.3
...
If you want to try by yourself, you can do:
$ mkdir angular-material-select
$ cd angular-material-select
$ git clone git#github.com:napolev/angular-material-select.git .
$ npm install
$ ng serve
How do I make this demo project work?
Extract AppModule from main.ts into it's own file app.module.ts
Extract DemoMaterialModule from main.ts into it's own file
Add DemoMaterialModule to AppModule's imports list
I created a simple webpack project for a Typescript library : https://github.com/lbar/test-webpackts-issue
On linux, npm run build finishes successfully:
> rimraf dist && webpack --progress --profile
10% 0/1 build modulests-loader: Using typescript#1.8.10 and /tmp/testwebpack/tsconfig.json 8030ms1217ms optimi5ms emit
Hash: 8eac1502f3b7a9a19be2
Version: webpack 1.13.1
Time: 2596ms
Asset Size Chunks Chunk Names
index.js 816 bytes 0 [emitted] index
index.js.map 6.07 kB 0 [emitted] index
/tmp/testwebpack/dist/index.d.ts 31 bytes [emitted]
/tmp/testwebpack/dist/src/info.d.ts 49 bytes [emitted]
+ 2 hidden modules
On Windows, npm run build is blocked during 'emit' phase. The output is :
> rimraf dist && webpack --progress --profile
10% 0/1 build modulests-loader: Using typescript#1.8.10 and C:\tmp\testwebpack\tsconfig.jso
1836ms build modules
3ms seal
7ms optimize
3ms hashing
7ms create chunk assets
79ms additional chunk assets
19ms optimize chunk assets
837ms optimize assets
95% emit
The version of node differs: 6.2.2 on Windows and 4.4.5 on Linux. I don't know if it may be the cause.
Has anyone an idea about the problem? Issue in webpack, ts-loader or typescript?
One more thing, call to tsc is working on both systems.
Thanks for your help
This problem is caused by an issue in ts-loader: https://github.com/TypeStrong/ts-loader/issues/185
A Pull Request is waiting fixes for project core team.
Webpack can use "awesome-typescript-loader" to avoid this issue.