Skip to content
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

Import statements not resolving when using yalc link #222

Open
AllenAttuned opened this issue Aug 1, 2023 · 0 comments
Open

Import statements not resolving when using yalc link #222

AllenAttuned opened this issue Aug 1, 2023 · 0 comments

Comments

@AllenAttuned
Copy link

Environment:

  • macOS 12.6
  • Node v16.15.0
  • NPM v8.16.0
  • WebStorm

This might be more of an IDE or Node.js issue, but it's stumped me for a while.

As stated in the docs, when using yalc link a symlink is created in the project's node_modules directory which points to the project's .yalc/<some lib> directory. For my situation, this works great as I do not want to modify the project's package.json file.

The issue I'm having is withimport statements and type definitions. import statements do resolve, so this might be a pure IDE issue, but if instead of "linking" the Yalc dependency I use yalc add, the aforementioned issues don't occur.

This is the build process that I'm following:

build:
	npx tspc
	NODE_ENV=${env} npx babel src \
	--out-dir ${output_dir} \
	--extensions '.ts','.js','.tsx','.jsx' \

local_pub: clean_build
local_pub:
	npx yalc publish
	npx yalc push
	cd ${yalc_global_package_path} && \
		npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant