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'
Related
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.
I'm new to git CI and I'm trying to create a pipeline for a school project. I need to run some tests with Cypress through the CI but I get an Error: spawn ps ENOENT.
The CI job:
cypress-test-job:
image: cypress/browsers:node16.14.0-slim-chrome99-ff97
stage: test
script:
- cd frontend-webpack/
- echo "Testing frontend with Cypress"
- npm ci
- npm run test
- echo "Testing complete"
My package.json:
{
"name": "seminar-week5-client",
"version": "1.0.0",
"description": "",
"main": "index.html",
"scripts": {
"build": "npx webpack-cli",
"build:dev": "npx webpack-cli --mode=development",
"start": "npx webpack serve",
"watch": "npx webpack serve",
"lint": "npx eslint src/**.js src/js/**.js",
"cy:test": "npx cypress run",
"test:headless": "npx cypress run --spec cypress/integration/ToDo_tests.js",
"test": "start-server-and-test start http-get://localhost:8080 cy:test"
},
"author": "",
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1",
"lodash": "^4.17.11",
"sass": "^1.49.11",
"wait-on": "^6.0.1"
},
"devDependencies": {
"babel-loader": "^8.2.4",
"css-loader": "^6.7.1",
"cypress": "^9.5.3",
"eslint": "^8.12.0",
"eslint-webpack-plugin": "^3.1.1",
"html-loader": "^3.1.0",
"html-webpack-plugin": "^5.5.0",
"sass-loader": "^12.6.0",
"start-server-and-test": "^1.14.0",
"style-loader": "^3.3.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.8.0"
}
}
The failed output of the pipeline:
Running with gitlab-runner 14.9.0~beta.68.g1283960c (1283960c)
on green-4.shared.runners-manager.gitlab.com/default ntHFEtyX
Resolving secrets
00:00
Preparing the "docker+machine" executor
00:41
Using Docker executor with image cypress/browsers:node16.14.0-slim-chrome99-ff97 ...
Pulling docker image cypress/browsers:node16.14.0-slim-chrome99-ff97 ...
Using docker image sha256:beaac0b58885bf17f2b91ce142daaed6658aaee184bff7c8f114e2210db567cc for cypress/browsers:node16.14.0-slim-chrome99-ff97 with digest cypress/browsers#sha256:e55e133a7b66e1e0fd13b8e7db1f545771ed3a98f76fc662fce268d02ab0aff9 ...
Preparing environment
00:02
Running on runner-nthfetyx-project-34382765-concurrent-0 via runner-nthfetyx-shared-1649414442-4ad4be93...
Getting source from Git repository
00:12
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/saxion.nl/hbo-ict/development-tools/web/38/.git/
Created fresh repository.
Checking out 8c002ea2 as master...
Skipping Git submodules setup
Executing "step_script" stage of the job script
02:45
Using docker image sha256:beaac0b58885bf17f2b91ce142daaed6658aaee184bff7c8f114e2210db567cc for cypress/browsers:node16.14.0-slim-chrome99-ff97 with digest cypress/browsers#sha256:e55e133a7b66e1e0fd13b8e7db1f545771ed3a98f76fc662fce268d02ab0aff9 ...
$ cd frontend-webpack/
$ echo "Testing frontend with Cypress"
Testing frontend with Cypress
$ npm ci
added 624 packages, and audited 625 packages in 55s
78 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ npm run test
> seminar-week5-client#1.0.0 test
> start-server-and-test start http-get://localhost:8080 cy:test
1: starting server using command "npm run start"
and when url "[ 'http-get://localhost:8080' ]" is responding with HTTP status code 200
running tests using command "npm run cy:test"
> seminar-week5-client#1.0.0 start
> npx webpack serve
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/builds/saxion.nl/hbo-ict/development-tools/web/38/frontend-webpack/src' directory
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
[BABEL] Note: The code generator has deoptimised the styling of /builds/saxion.nl/hbo-ict/development-tools/web/38/frontend-webpack/node_modules/lodash/lodash.js as it exceeds the max of 500KB.
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
<i> [webpack-dev-middleware] wait until bundle finished: /
asset app.bundle.js 2.19 MiB [emitted] [minimized] [big] (name: main) 1 related asset
asset a5441281b140aaf5cb21.png 80.6 KiB [emitted] [immutable] [from: src/images/delete.png] (auxiliary name: main)
asset index.html 419 bytes [emitted]
runtime modules 27.5 KiB 13 modules
orphan modules 19.9 KiB [orphan] 9 modules
javascript modules 987 KiB
modules by path ./node_modules/ 980 KiB
modules by path ./node_modules/style-loader/dist/runtime/*.js 5.75 KiB 6 modules
modules by path ./node_modules/webpack-dev-server/client/ 56.8 KiB 4 modules
modules by path ./node_modules/webpack/hot/*.js 4.4 KiB 4 modules
modules by path ./node_modules/html-entities/lib/*.js 115 KiB 4 modules
modules by path ./node_modules/css-loader/dist/runtime/*.js 3.52 KiB 3 modules
+ 4 modules
modules by path ./src/ 6.81 KiB
./src/app.js + 1 modules 2.64 KiB [built] [code generated]
./src/styles/appStyle.scss 2.41 KiB [built] [code generated]
./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/appStyle.scss 1.76 KiB [built] [code generated]
./src/images/delete.png 42 bytes (javascript) 80.6 KiB (asset) [built] [code generated]
webpack 5.72.0 compiled successfully in 19130 ms
> seminar-week5-client#1.0.0 cy:test
> npx cypress run
[STARTED] Task without title.
[SUCCESS] Task without title.
[310:0408/104418.838935:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
[310:0408/104418.839032:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
[310:0408/104418.846171:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[475:0408/104418.911107:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
tput: unknown terminal "xterm npm_config_loglevel warn npm_config_unsafe_perm true"
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 9.5.3 │
│ Browser: Electron 94 (headless) │
│ Node Version: v16.14.0 (/usr/local/bin/node) │
│ Specs: 1 found (ToDo_tests.js) │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: ToDo_tests.js (1 of 1)
[310:0408/104421.132271:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
My ToDo list
✓ can add new todo items (10167ms)
✓ can remove todo items (7887ms)
✓ Try adding duplicate item (3738ms)
✓ Delete the rest (2554ms)
4 passing (25s)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 4 │
│ Passing: 4 │
│ Failing: 0 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 24 seconds │
│ Spec Ran: ToDo_tests.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Video)
- Started processing: Compressing to 32 CRF
Compression progress: 68%
- Finished processing: /builds/saxion.nl/hbo-ict/development-tools/web/38/frontend (20 seconds)
-webpack/cypress/videos/ToDo_tests.js.mp4
Compression progress: 100%
tput: unknown terminal "xterm npm_config_loglevel warn npm_config_unsafe_perm true"
====================================================================================================
(Run Finished)
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ ToDo_tests.js 00:24 4 4 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✔ All specs passed! 00:24 4 4 - - -
node:events:498
throw er; // Unhandled 'error' event
^
Error: spawn ps ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn ps',
path: 'ps',
spawnargs: [ '-A', '-o', 'ppid,pid,stat,comm' ]
}
Uploading artifacts for failed job
00:02
Uploading artifacts...
frontend-webpack/cypress/videos/*.mp4: found 1 matching files and directories
Uploading artifacts as "archive" to coordinator... 201 Created id=2310380359 responseStatus=201 Created token=gaMq6mXk
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
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 want to create and serve a ng app. The problem is that after following the installation of angular 5 (+ionic) I found myself have the same problem over and over again and I have no idea what is causing it. I don't really understand what is the issue but I cannot serve any angular app.
The way I can resolve this is by a complete format of C:\ drive and reinstall anything from scratch. Last time I did it was 2 days ago. And before that 7 days ago.
This is all the stuff I get in the cmd.exe:
D:\!MY PROJECTS\APP-test>ng new engi
create engi/e2e/app.e2e-spec.ts (286 bytes)
create engi/e2e/app.po.ts (208 bytes)
create engi/e2e/tsconfig.e2e.json (235 bytes)
create engi/karma.conf.js (923 bytes)
create engi/package.json (1309 bytes)
create engi/protractor.conf.js (722 bytes)
create engi/README.md (1020 bytes)
create engi/tsconfig.json (363 bytes)
create engi/tslint.json (3097 bytes)
create engi/.angular-cli.json (1239 bytes)
create engi/.editorconfig (245 bytes)
create engi/.gitignore (516 bytes)
create engi/src/assets/.gitkeep (0 bytes)
create engi/src/environments/environment.prod.ts (51 bytes)
create engi/src/environments/environment.ts (387 bytes)
create engi/src/favicon.ico (5430 bytes)
create engi/src/index.html (291 bytes)
create engi/src/main.ts (370 bytes)
create engi/src/polyfills.ts (2405 bytes)
create engi/src/styles.css (80 bytes)
create engi/src/test.ts (1085 bytes)
create engi/src/tsconfig.app.json (211 bytes)
create engi/src/tsconfig.spec.json (304 bytes)
create engi/src/typings.d.ts (104 bytes)
create engi/src/app/app.module.ts (316 bytes)
create engi/src/app/app.component.html (1141 bytes)
create engi/src/app/app.component.spec.ts (986 bytes)
create engi/src/app/app.component.ts (207 bytes)
create engi/src/app/app.component.css (0 bytes)
Installing packages for tooling via npm.
Installed packages for tooling via npm.
Project 'engi' successfully created.
D:\!MY PROJECTS\APP-test>cd engi
D:\!MY PROJECTS\APP-test\engi>ng serve
** NG Live Development Server is listening on localhost:4200, open your
browser on http://localhost:4200/ **
Date: 2017-12-04T19:00:14.752Z
Hash: 96b1bdc547c1ab33ed03
Time: 4145ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 3.25 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 257 bytes [initial]
[rendered]
chunk {styles} styles.bundle.js (styles) 246 bytes [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 861 kB [initial] [rendered]
ERROR in multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
Module not found: Error: Can't resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
Parsed request is a directory
using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
after using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
No description file found
as directory
existing directory
using path: D:\index
No description file found
after using path: D:\index
no extension
D:\index doesn't exist
.js
D:\index.js doesn't exist
.json
D:\index.json doesn't exist
[D:\package.json]
[D:\index\package.json]
[D:\index]
[D:\index.js]
[D:\index.json]
# multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in multi ./src/polyfills.ts
Module not found: Error: Can't resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
Parsed request is a directory
using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
after using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
No description file found
as directory
existing directory
using path: D:\index
No description file found
after using path: D:\index
no extension
D:\index doesn't exist
.js
D:\index.js doesn't exist
.json
D:\index.json doesn't exist
[D:\package.json]
[D:\index\package.json]
[D:\index]
[D:\index.js]
[D:\index.json]
# multi ./src/polyfills.ts
ERROR in multi ./src/styles.css
Module not found: Error: Can't resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
Parsed request is a directory
using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
after using description file: D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\package.json (relative path:
./models/webpack-configs)
No description file found
as directory
existing directory
using path: D:\index
No description file found
after using path: D:\index
no extension
D:\index doesn't exist
.js
D:\index.js doesn't exist
.json
D:\index.json doesn't exist
[D:\package.json]
[D:\index\package.json]
[D:\index]
[D:\index.js]
[D:\index.json]
# multi ./src/styles.css
ERROR in Error: Child compilation failed:
Entry module not found: Error: Can't resolve 'D:\' in 'D:\!MY
PROJECTS\APP-test\engi\node_modules\#angular\cli\models\webpack-configs':
Error: Can't resolve 'D:\' in 'D:\!MY PROJECTS\APP-
test\engi\node_modules\#angular\cli\models\webpack-configs'
- compiler.js:76
[engi]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:304 compile
[engi]/[webpack]/lib/Compiler.js:304:11
- Compiler.js:514 applyPluginsAsync.err
[engi]/[webpack]/lib/Compiler.js:514:14
- Tapable.js:202 next
[engi]/[tapable]/lib/Tapable.js:202:11
- CachePlugin.js:78 Compiler.<anonymous>
[engi]/[webpack]/lib/CachePlugin.js:78:5
- Tapable.js:206 Compiler.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:206:13
- Compiler.js:511 compilation.seal.err
[engi]/[webpack]/lib/Compiler.js:511:11
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:680 self.applyPluginsAsync.err
[engi]/[webpack]/lib/Compilation.js:680:19
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:671 self.applyPluginsAsync.err
[engi]/[webpack]/lib/Compilation.js:671:11
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:666 self.applyPluginsAsync.err
[engi]/[webpack]/lib/Compilation.js:666:10
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:195:46
- Compilation.js:662 sealPart2
[engi]/[webpack]/lib/Compilation.js:662:9
- Tapable.js:195 Compilation.applyPluginsAsyncSeries
[engi]/[tapable]/lib/Tapable.js:195:46
webpack: Failed to compile.
Remove the ! from your directory name.
(Adding here from the comment for resolution)
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.