question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error to build a library

See original GitHub issue

Hi, i’ve created a lib with StencilJS into a clean NX project (using OSS template), but when i run the build command the following error appears:

nx run core:build --debug --verbose 
Cannot find module '@nrwl/workspace/src/utils/fileutils'
Require stack:
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/stencil-runtime/stencil-runtime.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/stencil-runtime/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/build/builder.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/src/commands/ngcli-adapter.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/src/commands/run.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/cli/lib/run-cli.js
Error: Cannot find module '@nrwl/workspace/src/utils/fileutils'
Require stack:
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/stencil-runtime/stencil-runtime.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/stencil-runtime/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/build/builder.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/node_modules/@angular-devkit/architect/node/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/src/commands/ngcli-adapter.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/src/commands/run.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/index.js
- /home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/cli/lib/run-cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at Module.require (/home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/tao/src/compat/compat.js:7:40)
    at Module.require (/home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/node_modules/@nrwl/tao/src/compat/compat.js:7:40)
    at Module.require (/home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nrwl/devkit/node_modules/@nrwl/tao/src/compat/compat.js:7:40)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/rsiqueira/projects/nx-oss-template/stencil-project/node_modules/@nxext/stencil/src/builders/stencil-runtime/stencil-runtime.js:7:21)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
error Command failed with exit code 1.

Dependecies and devDependecies:


  "dependencies": {},
  "devDependencies": {
    "@angular-devkit/schematics": "^11.1.2",
    "@commitlint/cli": "^11.0.0",
    "@commitlint/config-conventional": "^11.0.0",
    "@commitlint/prompt-cli": "^11.0.0",
    "@jscutlery/semver": "^1.2.0",
    "@justa/prettier-rules": "^0.0.1",
    "@nrwl/cli": "11.2.9",
    "@nrwl/jest": "11.2.9",
    "@nrwl/tao": "11.2.9",
    "@nrwl/workspace": "11.2.9",
    "@nxext/stencil": "^11.0.0",
    "@stencil/core": "^2.3.0",
    "@stencil/sass": "1.4.1",
    "@types/jest": "26.0.8",
    "@types/node": "12.12.38",
    "@types/puppeteer": "~3.0.2",
    "dotenv": "6.2.0",
    "husky": "^4.3.8",
    "jest": "26.2.2",
    "prettier": "2.2.1",
    "pretty-quick": "^3.1.0",
    "puppeteer": "~5.3.1",
    "ts-jest": "26.4.0",
    "ts-node": "~9.1.1",
    "typescript": "~4.0.3"
  },

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DominikPiepercommented, Feb 3, 2021

The new version renamed utils to utilities

0reactions
raisiqueiracommented, Feb 4, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Build a Library - Error - JavaScript - Codecademy Forums
I am working on the JavaScript project "Build a Library. I don't know why line 72 is giving me an error. I tested...
Read more >
error: library not found" using Xcode build - Stack Overflow
I'm trying to build an iOS app using Xcode. I'm new to XCode. I had trouble building it for release purposes with this...
Read more >
gradle build error - package the same library. - Issue Tracker
After updating from gradle 4.x to 4.6 I can no longer build my application. Gradle errors and says: "all package the same library."...
Read more >
Error while building a c++ library interface - MATLAB Answers
I am trying to build an interface to a C++ library I wrote following the procedure described here. I define the missing constrcut...
Read more >
Error: Some of the library <YOUR LIBRARY> dependencies ...
We have just upgraded to Angular 8 and are having an issue with our build. We have two libraries generated by the Nrwl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found